mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:17:08 +00:00
Compare commits
6 Commits
261-wrong-
...
262-preset
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fc51de7d8 | ||
|
|
158e0fb788 | ||
|
|
941d15c1bc | ||
|
|
54fbc76da5 | ||
|
|
fb3d3be546 | ||
|
|
8e11e242ed |
@@ -3,8 +3,8 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve --host=0.0.0.0",
|
||||
"build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build"
|
||||
"serve": "vue-cli-service serve --host=0.0.0.0",
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdi/font": "^7.2.96",
|
||||
|
||||
@@ -604,16 +604,16 @@ export default {
|
||||
async getLabelDefinitions () {
|
||||
const url = `/project/${this.$route.params.project}/label`;
|
||||
|
||||
const labelSet = {};
|
||||
const labels = await this.api([url]) || [];
|
||||
labels.forEach( l => labelSet[l.name] = l.data );
|
||||
this.labels = labelSet;
|
||||
//const labelSet = {};
|
||||
this.labels = await this.api([url]) ?? {};
|
||||
//labels.forEach( l => labelSet[l.name] = l.data );
|
||||
//this.labels = labelSet;
|
||||
},
|
||||
|
||||
async getPresetRemarks () {
|
||||
const url = `/project/${this.$route.params.project}/configuration/events/presetRemarks`;
|
||||
const url = `/project/${this.$route.params.project}/configuration`;
|
||||
|
||||
this.presetRemarks = await this.api([url]);
|
||||
this.presetRemarks = (await this.api([url]))?.events?.presetRemarks ?? {};
|
||||
},
|
||||
|
||||
newItem (from = {}) {
|
||||
|
||||
@@ -98,7 +98,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
async list () {
|
||||
this.items = await this.api(["/project/"]) || [];
|
||||
this.items = await this.api(["/project"]) || [];
|
||||
},
|
||||
|
||||
async summary (item) {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
const { label } = require('../../../lib/db');
|
||||
const { project } = require('../../../lib/db');
|
||||
|
||||
module.exports = async function (req, res, next) {
|
||||
|
||||
try {
|
||||
res.status(200).send(await label.list(req.params.project, req.query));
|
||||
const labels = (await project.configuration.get(req.params.project))?.labels ?? {};
|
||||
res.status(200).send(labels);
|
||||
next();
|
||||
} catch (err) {
|
||||
next(err);
|
||||
|
||||
Reference in New Issue
Block a user