feat: 实现投瓶和异步内容审核
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { Body, Controller, Inject, Patch, UseGuards } from "@nestjs/common";
|
||||
import { AuthGuard } from "../auth/auth.guard.js";
|
||||
import { CurrentUser } from "../auth/current-user.decorator.js";
|
||||
import type { AccessClaims } from "../auth/token.service.js";
|
||||
import { UpdateAnonymousProfileDto } from "./dto.js";
|
||||
import { ProfileService } from "./profile.service.js";
|
||||
|
||||
@Controller("me/anonymous-profile")
|
||||
@UseGuards(AuthGuard)
|
||||
export class ProfileController {
|
||||
constructor(
|
||||
@Inject(ProfileService) private readonly profiles: ProfileService,
|
||||
) {}
|
||||
|
||||
@Patch()
|
||||
update(
|
||||
@CurrentUser() user: AccessClaims,
|
||||
@Body() input: UpdateAnonymousProfileDto,
|
||||
) {
|
||||
return this.profiles.update(user.sub, input);
|
||||
}
|
||||
}
|
||||
|
||||
Reflect.defineMetadata(
|
||||
"design:paramtypes",
|
||||
[Object, UpdateAnonymousProfileDto],
|
||||
ProfileController.prototype,
|
||||
"update",
|
||||
);
|
||||
Reference in New Issue
Block a user