Compare commits
5 Commits
amalia/03-
...
staging
| Author | SHA1 | Date | |
|---|---|---|---|
| 9db9462faf | |||
| 0f90302f11 | |||
| 1b1a6b1b51 | |||
| 3a116ce212 | |||
| 05a8fa0c47 |
@@ -45,7 +45,7 @@ export async function POST(request: Request) {
|
||||
|
||||
export async function PUT(request: Request) {
|
||||
try {
|
||||
const { token, user } = (await request.json());
|
||||
const { token, user, category } = (await request.json());
|
||||
|
||||
const userMobile = await funGetUserById({ id: user })
|
||||
if (userMobile.id == "null" || userMobile.id == undefined || userMobile.id == "") {
|
||||
@@ -62,8 +62,10 @@ export async function PUT(request: Request) {
|
||||
|
||||
}
|
||||
|
||||
// create log user
|
||||
const log = await createLogUserMobile({ act: 'LOGOUT', desc: 'User logout', table: 'user', data: '', user: userMobile.id })
|
||||
if (category != "unregister") {
|
||||
// create log user
|
||||
const log = await createLogUserMobile({ act: 'LOGOUT', desc: 'User logout', table: 'user', data: '', user: userMobile.id })
|
||||
}
|
||||
|
||||
return NextResponse.json({ success: true, message: "Berhasil menghapus token", }, { status: 200 });
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user