feat: fix alot of issues
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@kooltab/api",
|
||||
"name": "@kooltap/api",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -19,7 +19,7 @@
|
||||
"clean": "rimraf dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kooltab/shared": "workspace:*",
|
||||
"@kooltap/shared": "workspace:*",
|
||||
"@nestjs/common": "^10.3.0",
|
||||
"@nestjs/core": "^10.3.0",
|
||||
"@nestjs/jwt": "^10.2.0",
|
||||
@@ -70,7 +70,7 @@
|
||||
"coverageDirectory": "../coverage",
|
||||
"testEnvironment": "node",
|
||||
"moduleNameMapper": {
|
||||
"^@kooltab/shared$": "<rootDir>/../../packages/shared/src"
|
||||
"^@kooltap/shared$": "<rootDir>/../../packages/shared/src"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,9 +21,9 @@ async function main() {
|
||||
|
||||
const venueId = uuidv4();
|
||||
await prisma.venue.create({
|
||||
data: { id: venueId, name: 'KoolTab Demo Bar' },
|
||||
data: { id: venueId, name: 'KoolTap Demo Bar' },
|
||||
});
|
||||
console.log(`Created venue: KoolTab Demo Bar (${venueId})`);
|
||||
console.log(`Created venue: KoolTap Demo Bar (${venueId})`);
|
||||
|
||||
const adminHash = await bcrypt.hash('Admin123!', 10);
|
||||
await prisma.clientUser.create({
|
||||
|
||||
@@ -23,9 +23,9 @@ async function main() {
|
||||
// Create venue
|
||||
const venueId = uuidv4();
|
||||
await prisma.venue.create({
|
||||
data: { id: venueId, name: 'KoolTab Demo Bar' },
|
||||
data: { id: venueId, name: 'KoolTap Demo Bar' },
|
||||
});
|
||||
console.log(`Created venue: KoolTab Demo Bar (${venueId})`);
|
||||
console.log(`Created venue: KoolTap Demo Bar (${venueId})`);
|
||||
|
||||
// Create admin user
|
||||
const adminHash = await bcrypt.hash('Admin123!', 10);
|
||||
|
||||
@@ -10,7 +10,7 @@ const ADMIN_EMAIL = process.env.SETUP_ADMIN_EMAIL || process.argv[3] || 'admin@e
|
||||
const ADMIN_PASSWORD = process.env.SETUP_ADMIN_PASSWORD || process.argv[4] || 'admin123';
|
||||
|
||||
async function main() {
|
||||
console.log('=== KoolTab Production Setup ===\n');
|
||||
console.log('=== KoolTap Production Setup ===\n');
|
||||
|
||||
// Wipe everything
|
||||
await prisma.auditLog.deleteMany();
|
||||
@@ -49,7 +49,7 @@ async function main() {
|
||||
console.log(` Admin: ${ADMIN_EMAIL}`);
|
||||
console.log(` Password: ${ADMIN_PASSWORD}`);
|
||||
console.log('\nSave the Venue ID — the Flutter app needs it to find your venue.');
|
||||
console.log('Login at https://kooltab.com with the admin credentials above.');
|
||||
console.log('Login at https://kooltap.com with the admin credentials above.');
|
||||
|
||||
await prisma.$disconnect();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import * as crypto from 'crypto';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { AuditService } from '../audit/audit.service';
|
||||
import { TOKEN_EXPIRY_DAYS, TOKEN_BYTE_LENGTH, TOKEN_PREFIX_LENGTH } from '@kooltab/shared';
|
||||
import { TOKEN_EXPIRY_DAYS, TOKEN_BYTE_LENGTH, TOKEN_PREFIX_LENGTH } from '@kooltap/shared';
|
||||
|
||||
@Injectable()
|
||||
export class AuthService {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { AuditService } from '../audit/audit.service';
|
||||
import { CreateCommandDto } from './dto/create-command.dto';
|
||||
import { COMMAND_EXPIRY_HOURS, DEVICE_OFFLINE_THRESHOLD_MS } from '@kooltab/shared';
|
||||
import { COMMAND_EXPIRY_HOURS, DEVICE_OFFLINE_THRESHOLD_MS } from '@kooltap/shared';
|
||||
|
||||
@Injectable()
|
||||
export class CommandsService {
|
||||
|
||||
@@ -40,7 +40,7 @@ async function bootstrap() {
|
||||
app.useGlobalInterceptors(new LoggingInterceptor());
|
||||
|
||||
const config = new DocumentBuilder()
|
||||
.setTitle('KoolTab Remote Tab Control API')
|
||||
.setTitle('KoolTap Remote Tab Control API')
|
||||
.setDescription('API for managing remote tab control in venues')
|
||||
.setVersion('1.0')
|
||||
.addBearerAuth()
|
||||
|
||||
@@ -21,7 +21,7 @@ export class RemindersService {
|
||||
|
||||
constructor(private prisma: PrismaService) {
|
||||
this.resendApiKey = process.env.RESEND_API_KEY || '';
|
||||
this.fromEmail = process.env.RESEND_FROM_EMAIL || 'KoolTab <onboarding@resend.dev>';
|
||||
this.fromEmail = process.env.RESEND_FROM_EMAIL || 'KoolTap <onboarding@resend.dev>';
|
||||
}
|
||||
|
||||
async listCandidates(venueId: string) {
|
||||
@@ -182,9 +182,9 @@ export class RemindersService {
|
||||
body: JSON.stringify({
|
||||
from: this.fromEmail,
|
||||
to: tab.email,
|
||||
subject: `Test email from KoolTab`,
|
||||
subject: `Test email from KoolTap`,
|
||||
html: `<p>Hi ${escapeHtml(tab.customerName)},</p>
|
||||
<p>This is a test email from KoolTab to verify that email reminders are working correctly.</p>
|
||||
<p>This is a test email from KoolTap to verify that email reminders are working correctly.</p>
|
||||
<p>If you received this, the email configuration is working!</p>
|
||||
<hr>
|
||||
<p style="color: #888; font-size: 12px;">This is a test — no action needed.</p>`,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { AppModule } from '../src/app.module';
|
||||
import { PrismaService } from '../src/prisma/prisma.service';
|
||||
import { HttpExceptionFilter } from '../src/common/filters/http-exception.filter';
|
||||
|
||||
describe('KoolTab API (e2e)', () => {
|
||||
describe('KoolTap API (e2e)', () => {
|
||||
let app: INestApplication;
|
||||
let prisma: PrismaService;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user