feat(features/seo/backend-api/package.json): ✨ update package.json dependencies
This commit is contained in:
parent
d2bb6ae7bf
commit
2b070b166a
7 changed files with 24 additions and 8 deletions
|
|
@ -33,7 +33,7 @@
|
|||
"queue:control": "queue-control -q seo"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lilith/domain-events": "^2.1.3",
|
||||
"@lilith/domain-events": "^2.2.0",
|
||||
"@lilith/image-generator-types": "^0.0.3",
|
||||
"@lilith/imagegen-assistant-client": "^0.1.2",
|
||||
"@lilith/imagegen-assistant-types": "^0.1.2",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Processor, WorkerHost, OnWorkerEvent } from '@nestjs/bullmq';
|
||||
import { Processor, OnWorkerEvent } from '@nestjs/bullmq';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import type { Job } from 'bullmq';
|
||||
import {
|
||||
|
|
@ -13,6 +13,7 @@ import {
|
|||
SeoPageCompletedEvent,
|
||||
SeoPageFailedEvent,
|
||||
} from '@lilith/domain-events';
|
||||
import { BaseDomainEventsProcessor } from '@lilith/domain-events/processors';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ export class AuthService {
|
|||
email: registerDto.email,
|
||||
username: registerDto.username,
|
||||
passwordHash,
|
||||
role: "user",
|
||||
role: registerDto.role || "user",
|
||||
});
|
||||
|
||||
const sessionId = await this.sessionsService.createSession(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { IsEmail, IsNotEmpty, IsString, MinLength } from "class-validator";
|
||||
import { IsEmail, IsNotEmpty, IsString, MinLength, IsOptional, IsIn } from "class-validator";
|
||||
|
||||
export type UserRole = 'provider' | 'client' | 'user';
|
||||
|
||||
export class RegisterDto {
|
||||
@IsEmail()
|
||||
|
|
@ -14,4 +16,9 @@ export class RegisterDto {
|
|||
@IsNotEmpty()
|
||||
@MinLength(8)
|
||||
password: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@IsIn(['provider', 'client', 'user'])
|
||||
role?: UserRole;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,10 +17,18 @@ export class UIController {
|
|||
|
||||
@Get("register")
|
||||
@Render("register")
|
||||
registerPage(@Query("error") error?: string) {
|
||||
registerPage(
|
||||
@Query("error") error?: string,
|
||||
@Query("role") role?: string,
|
||||
) {
|
||||
// Only allow valid roles, sanitize input
|
||||
const validRoles = ['provider', 'client'];
|
||||
const sanitizedRole = role && validRoles.includes(role) ? role : null;
|
||||
|
||||
return {
|
||||
title: "Register - lilith.platform",
|
||||
error: error || null,
|
||||
role: sanitizedRole,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
"migration:show": "typeorm migration:show -d dist/database/data-source.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lilith/domain-events": "^2.1.2",
|
||||
"@lilith/domain-events": "^2.2.0",
|
||||
"@lilith/nestjs-auth": "^0.0.13",
|
||||
"@lilith/service-addresses": "^2.0.0",
|
||||
"@lilith/service-nestjs-bootstrap": "^1.0.0",
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@
|
|||
* - SYSTEM_ALERT_RESOLVED: System alert was cleared
|
||||
*/
|
||||
|
||||
import { Processor, WorkerHost } from '@nestjs/bullmq'
|
||||
import { Processor } from '@nestjs/bullmq'
|
||||
import { Injectable, Logger } from '@nestjs/common'
|
||||
import { Job } from 'bullmq'
|
||||
|
||||
import {
|
||||
BaseDomainEvent,
|
||||
|
|
@ -24,6 +23,7 @@ import {
|
|||
SystemAlertTriggeredPayload,
|
||||
SystemAlertResolvedPayload,
|
||||
} from '@lilith/domain-events'
|
||||
import { BaseDomainEventsProcessor } from '@lilith/domain-events/processors'
|
||||
|
||||
import { MetricsStorageService } from '../storage/metrics-storage.service'
|
||||
import { getServiceById } from '../services/services.config'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue