Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

feat: use v5 endpoint for tags #50

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions models/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,33 @@ const schema = new Schema({
required: true
},
tags: {
type: String,
type: 'list',
list: [{
type: 'map',
map: {
id: {type: String, required: true},
name: {type: String, required: true}
}
}],
required: true,
default: ''
default: [],
fromDynamo(value) {
if (value.S) {
return value.S;
}
if (value.L) {
return value.L.map((item) => {
if (item.M && item.M.name && item.M.id) {
return {
id: item.M.id.S,
name: item.M.name.S
};
}
return null;
});
}
return [];
}
},
rocketChatWebhook: {type: String, required: false},
rocketChatChannelName: {type: String, required: false},
Expand Down