upd: auth
Deskripsi: - update log user pada edit profile, login, dan logout No Issues
This commit is contained in:
@@ -4,6 +4,7 @@ import _ from "lodash";
|
||||
import { NextResponse } from "next/server";
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import { createLogUser } from "@/module/user";
|
||||
|
||||
|
||||
// GET PROFILE BY COOKIES
|
||||
@@ -139,6 +140,8 @@ export async function PUT(request: Request) {
|
||||
})
|
||||
}
|
||||
|
||||
const log = await createLogUser({ act: 'UPDATE', desc: 'User mengupdate data profile', table: 'user', data: user.id })
|
||||
|
||||
return NextResponse.json({ success: true, message: "Berhasil ubah profile" });
|
||||
} catch (error) {
|
||||
return NextResponse.json({ success: false, message: "Gagal ubah profile" }, { status: 500 });
|
||||
|
||||
Reference in New Issue
Block a user