feat: remove OTP gate from transactions, fix categories auth, add implementation plan
- Remove OtpGateGuard from transactions controller (OTP verified at login) - Fix categories controller to use authenticated user instead of TEMP_USER_ID - Add comprehensive implementation plan document - Update .env.example with WEB_APP_URL - Prepare for admin dashboard development
This commit is contained in:
15
apps/api/dist/seed.js
vendored
15
apps/api/dist/seed.js
vendored
@@ -2,18 +2,21 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const client_1 = require("@prisma/client");
|
||||
const prisma = new client_1.PrismaClient();
|
||||
const adminSeeder = {
|
||||
email: 'dwindi.ramadhana@gmail.com',
|
||||
password: 'tabungin2k25!@#',
|
||||
};
|
||||
const TEMP_USER_ID = process.env.TEMP_USER_ID || '16b74848-daa3-4dc9-8de2-3cf59e08f8e3';
|
||||
async function main() {
|
||||
const userId = '16b74848-daa3-4dc9-8de2-3cf59e08f8e3';
|
||||
const user = await prisma.user.upsert({
|
||||
where: { id: userId },
|
||||
where: { id: TEMP_USER_ID },
|
||||
update: {},
|
||||
create: {
|
||||
id: userId,
|
||||
id: TEMP_USER_ID,
|
||||
email: 'temp@example.com',
|
||||
},
|
||||
});
|
||||
const existing = await prisma.wallet.findFirst({
|
||||
where: { userId: user.id, kind: 'money' },
|
||||
});
|
||||
const existing = await prisma.wallet.findFirst({});
|
||||
if (!existing) {
|
||||
await prisma.wallet.create({
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user