Refactor code to use consistent tab spacing
Replaced mixed spaces and tabs with consistent tab spacing across multiple files for better code readability and maintenance. Adjusted import statements and string literals formatting to maintain coherence.
This commit is contained in:
parent
6f9d25a58b
commit
3c31223293
@ -16,7 +16,7 @@ import { UserGuard } from "./auth.guard";
|
|||||||
|
|
||||||
@Controller("auth")
|
@Controller("auth")
|
||||||
export class AuthController {
|
export class AuthController {
|
||||||
constructor(private readonly authService: AuthService) { }
|
constructor(private readonly authService: AuthService) {}
|
||||||
|
|
||||||
//TODO Initial account validation for admin privileges
|
//TODO Initial account validation for admin privileges
|
||||||
//POST signup
|
//POST signup
|
||||||
|
@ -14,7 +14,7 @@ export class AuthService implements OnModuleInit {
|
|||||||
constructor(
|
constructor(
|
||||||
private db: DbService,
|
private db: DbService,
|
||||||
private credentials: CredentialsService,
|
private credentials: CredentialsService,
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
//TODO Initial account validation for admin privileges
|
//TODO Initial account validation for admin privileges
|
||||||
async doRegister(data: SignUpDto) {
|
async doRegister(data: SignUpDto) {
|
||||||
|
@ -6,7 +6,7 @@ import { JWTPayload, generateSecret } from "jose";
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CredentialsService {
|
export class CredentialsService {
|
||||||
constructor(private readonly configService: ConfigService) { }
|
constructor(private readonly configService: ConfigService) {}
|
||||||
|
|
||||||
async hash(plaintextPassword: string) {
|
async hash(plaintextPassword: string) {
|
||||||
if (plaintextPassword.length < 6)
|
if (plaintextPassword.length < 6)
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
import { Logger } from "@nestjs/common";
|
import { Logger } from "@nestjs/common";
|
||||||
import { NestFactory } from "@nestjs/core";
|
import { NestFactory } from "@nestjs/core";
|
||||||
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
|
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
|
||||||
|
|
||||||
|
|
||||||
import helmet from "helmet";
|
import helmet from "helmet";
|
||||||
import { AppModule } from "./app/app.module";
|
import { AppModule } from "./app/app.module";
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
|
|
||||||
const config = new DocumentBuilder()
|
const config = new DocumentBuilder()
|
||||||
.setTitle('Fab Explorer')
|
.setTitle("Fab Explorer")
|
||||||
.setDescription("Définition de l'api du FabLab Explorer")
|
.setDescription("Définition de l'api du FabLab Explorer")
|
||||||
.setVersion('1.0')
|
.setVersion("1.0")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
@ -21,7 +19,7 @@ async function bootstrap() {
|
|||||||
const port = process.env.PORT || 3000;
|
const port = process.env.PORT || 3000;
|
||||||
|
|
||||||
const document = SwaggerModule.createDocument(app, config);
|
const document = SwaggerModule.createDocument(app, config);
|
||||||
SwaggerModule.setup('api', app, document);
|
SwaggerModule.setup("api", app, document);
|
||||||
|
|
||||||
await app.listen(port);
|
await app.listen(port);
|
||||||
Logger.log(
|
Logger.log(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user