This commit is contained in:
syuilo
2021-12-09 23:58:30 +09:00
parent 0abe2dfee0
commit c69b72e199
573 changed files with 3318 additions and 3318 deletions

View File

@@ -17,16 +17,16 @@ export const meta = {
},
name: {
validator: $.optional.str.range(1, 128)
validator: $.optional.str.range(1, 128),
},
description: {
validator: $.nullable.optional.str.range(1, 2048)
validator: $.nullable.optional.str.range(1, 2048),
},
bannerId: {
validator: $.nullable.optional.type(ID),
}
},
},
res: {
@@ -39,21 +39,21 @@ export const meta = {
noSuchChannel: {
message: 'No such channel.',
code: 'NO_SUCH_CHANNEL',
id: 'f9c5467f-d492-4c3c-9a8d-a70dacc86512'
id: 'f9c5467f-d492-4c3c-9a8d-a70dacc86512',
},
accessDenied: {
message: 'You do not have edit privilege of the channel.',
code: 'ACCESS_DENIED',
id: '1fb7cb09-d46a-4fdf-b8df-057788cce513'
id: '1fb7cb09-d46a-4fdf-b8df-057788cce513',
},
noSuchFile: {
message: 'No such file.',
code: 'NO_SUCH_FILE',
id: 'e86c14a4-0da2-4032-8df3-e737a04c7f3b'
id: 'e86c14a4-0da2-4032-8df3-e737a04c7f3b',
},
}
},
};
export default define(meta, async (ps, me) => {
@@ -74,7 +74,7 @@ export default define(meta, async (ps, me) => {
if (ps.bannerId != null) {
banner = await DriveFiles.findOne({
id: ps.bannerId,
userId: me.id
userId: me.id,
});
if (banner == null) {