dev: controller

This commit is contained in:
Alex Tran 2023-08-10 16:23:48 -05:00
parent 4a34198b78
commit 22e5c6ead2
3 changed files with 81 additions and 0 deletions

View file

@ -376,6 +376,76 @@
]
}
},
"/album/{id}/rule": {
"post": {
"operationId": "addRule",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"201": {
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Album"
]
}
},
"/album/{id}/rule/{ruleId}": {
"delete": {
"operationId": "removeRule",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Album"
]
}
},
"/album/{id}/user/{userId}": {
"delete": {
"operationId": "removeUserFromAlbum",

View file

@ -86,4 +86,14 @@ export class AlbumController {
) {
return this.service.removeUser(authUser, id, userId);
}
@Post(':id/rule')
addRule(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto) {
throw new Error('Not implemented');
}
@Delete(':id/rule/:ruleId')
removeRule(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto) {
throw new Error('Not implemented');
}
}

View file

@ -29,4 +29,5 @@ export class RuleEntity {
export enum RuleKey {
PERSON = 'personId',
EXIF_CITY = 'exifInfo.city',
DATE_AFTER = 'asset.fileCreatedAt',
}