/
wax_boy
/
semaphore_custom
Обзор
Документация
Войти
/
wax_boy
/
semaphore_custom
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
web/src/components/ProjectMixin.js
37 строк
786 B
Denis Gukov
feat(templates): load playbooks style
14 июл 2026, 20:41
Не верифицирован
14 июл 2026, 20:41
cefb449
Код
Авторство
О чём код?
import axios from 'axios'; import EventBus from '@/event-bus'; export default { props: { projectId: Number, }, methods: { async loadEndpoint(endpoint, opts) { return ( await axios({ method: 'get', url: endpoint, responseType: 'json', ...opts, }) ).data; }, upgradeToPro(feature) { EventBus.$emit('i-subscription', { feature }); }, async loadProjectEndpoint(endpoint, opts) { return this.loadEndpoint(`/api/project/${this.projectId}${endpoint}`, opts); }, async loadProjectResources(name) { return this.loadProjectEndpoint(`/${name}`); }, async loadProjectResource(name, id) { return this.loadProjectEndpoint(`/${name}/${id}`); }, }, };