feat: P0f 会话分享链接 + 全栈验证
- 后端: POST /sessions/:id/share 生成 HMAC 签名分享令牌 - 后端: GET /sandbox/shared/:token 公开查看分享会话 - 前端: sandbox/page.tsx 新增「复制分享链接」按钮 - 前端: /sandbox/share?token=xxx 分享查看页面 - 全栈: 后端 build + 前端 61 页 + 92 tests 全部通过
This commit is contained in:
@@ -41,4 +41,9 @@ export class SandboxController {
|
||||
async quota(@Req() req: any) {
|
||||
return this.sandboxService.getQuota(req.user.userId);
|
||||
}
|
||||
|
||||
@Post('sessions/:id/share')
|
||||
async share(@Req() req: any, @Param('id', ParseIntPipe) id: number) {
|
||||
return this.sandboxService.generateShareToken(req.user.userId, id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user