feat(ai-image): AI生图开发
This commit is contained in:
@@ -28,6 +28,12 @@ export class WatermarksController {
|
||||
return this.watermarks.list(workspace.id, parse(listWatermarkTemplatesQuerySchema, query));
|
||||
}
|
||||
|
||||
@Get('watermark-templates/default')
|
||||
@ApiOperation({ summary: '读取当前工作空间的默认水印模板' })
|
||||
public async getDefault(@CurrentWorkspace() workspace: Workspace) {
|
||||
return { data: await this.watermarks.getDefault(workspace.id) };
|
||||
}
|
||||
|
||||
@Get('watermark-templates/:templateId')
|
||||
@ApiOperation({ summary: '读取水印模板当前版本' })
|
||||
public async get(@Param('templateId') templateId: string, @CurrentWorkspace() workspace: Workspace) {
|
||||
@@ -51,6 +57,15 @@ export class WatermarksController {
|
||||
idempotencyKey(key), revision(ifMatch), parse(updateWatermarkTemplateRequestSchema, body))).body;
|
||||
}
|
||||
|
||||
@Put('watermark-templates/:templateId/default')
|
||||
@ApiOkResponse({ description: '已设为当前工作空间的默认水印' })
|
||||
public async setDefault(@Param('templateId') templateId: string,
|
||||
@Headers('idempotency-key') key: string | undefined,
|
||||
@Req() request: AuthenticatedRequest, @CurrentWorkspace() workspace: Workspace) {
|
||||
return (await this.watermarks.setDefault(workspace.id, request.auth.userId,
|
||||
uuid('template_id', templateId), idempotencyKey(key))).body;
|
||||
}
|
||||
|
||||
@Delete('watermark-templates/:templateId')
|
||||
@HttpCode(204)
|
||||
@ApiNoContentResponse({ description: '已软删除模板并解除当前店铺绑定' })
|
||||
|
||||
Reference in New Issue
Block a user