forked from typijs/typijs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfolder.validation.ts
More file actions
27 lines (22 loc) · 612 Bytes
/
folder.validation.ts
File metadata and controls
27 lines (22 loc) · 612 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import * as Joi from '@hapi/joi';
import { RequestSchema } from '../../validation/requestSchema';
const parentFolderId = Joi.string().required();
const folderName = Joi.string().required();
export const requiredParentId: RequestSchema = {
params: Joi.object().keys({
parentId: parentFolderId
})
}
export const updateFolderName: RequestSchema = {
params: Joi.object().keys({
parentId: parentFolderId
}),
body: Joi.object().keys({
name: folderName
})
}
export const createFolder: RequestSchema = {
body: Joi.object().keys({
name: folderName
})
}