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

@ -15,7 +15,7 @@ export const meta = {
limit: {
duration: ms('1hour'),
max: 300
max: 300,
},
params: {
@ -36,11 +36,11 @@ export const meta = {
},
content: {
validator: $.arr($.obj())
validator: $.arr($.obj()),
},
variables: {
validator: $.arr($.obj())
validator: $.arr($.obj()),
},
script: {
@ -68,26 +68,26 @@ export const meta = {
noSuchPage: {
message: 'No such page.',
code: 'NO_SUCH_PAGE',
id: '21149b9e-3616-4778-9592-c4ce89f5a864'
id: '21149b9e-3616-4778-9592-c4ce89f5a864',
},
accessDenied: {
message: 'Access denied.',
code: 'ACCESS_DENIED',
id: '3c15cd52-3b4b-4274-967d-6456fc4f792b'
id: '3c15cd52-3b4b-4274-967d-6456fc4f792b',
},
noSuchFile: {
message: 'No such file.',
code: 'NO_SUCH_FILE',
id: 'cfc23c7c-3887-490e-af30-0ed576703c82'
id: 'cfc23c7c-3887-490e-af30-0ed576703c82',
},
nameAlreadyExists: {
message: 'Specified name already exists.',
code: 'NAME_ALREADY_EXISTS',
id: '2298a392-d4a1-44c5-9ebb-ac1aeaa5a9ab'
}
}
id: '2298a392-d4a1-44c5-9ebb-ac1aeaa5a9ab',
},
},
};
export default define(meta, async (ps, user) => {
@ -103,7 +103,7 @@ export default define(meta, async (ps, user) => {
if (ps.eyeCatchingImageId != null) {
eyeCatchingImage = await DriveFiles.findOne({
id: ps.eyeCatchingImageId,
userId: user.id
userId: user.id,
});
if (eyeCatchingImage == null) {
@ -114,7 +114,7 @@ export default define(meta, async (ps, user) => {
await Pages.find({
id: Not(ps.pageId),
userId: user.id,
name: ps.name
name: ps.name,
}).then(result => {
if (result.length > 0) {
throw new ApiError(meta.errors.nameAlreadyExists);