feat: remove appwrite and add nextjs backend
This commit is contained in:
13
backend/src/user/user.controller.ts
Normal file
13
backend/src/user/user.controller.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Controller, Get, UseGuards } from "@nestjs/common";
|
||||
import { User } from "@prisma/client";
|
||||
import { GetUser } from "src/auth/decorator/getUser.decorator";
|
||||
import { JwtGuard } from "src/auth/guard/jwt.guard";
|
||||
|
||||
@Controller("users")
|
||||
export class UserController {
|
||||
@Get("me")
|
||||
@UseGuards(JwtGuard)
|
||||
async getCurrentUser(@GetUser() user: User) {
|
||||
return user;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user