feat: 开发持仓、股票信息相关接口

This commit is contained in:
R524809
2026-01-12 17:38:55 +08:00
parent 67e4dc6382
commit 838a021ce5
46 changed files with 4407 additions and 12 deletions
@@ -220,7 +220,7 @@ export class StorageController {
/**
* 删除文件(需要管理员权限)
*/
@Delete(':path(*)')
@Delete('*path')
@HttpCode(HttpStatus.NO_CONTENT)
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles('admin', 'super_admin')
@@ -239,6 +239,10 @@ export class StorageController {
@ApiResponse({ status: 401, description: '未授权' })
@ApiResponse({ status: 403, description: '权限不足' })
async delete(@Param('path') filePath: string) {
await this.storageService.delete(filePath);
// 移除路径开头的 /,如果有的话
const cleanPath = filePath.startsWith('/')
? filePath.substring(1)
: filePath;
await this.storageService.delete(cleanPath);
}
}