From a9cd71995dabf3daeb644834992dda36a0df9fc2 Mon Sep 17 00:00:00 2001 From: Mathis Date: Mon, 23 Sep 2024 14:17:08 +0200 Subject: [PATCH] Add new dependencies and update existing ones Added dependencies include @nestjs/throttler, argon2, express, helmet, and jose. Updated existing dependencies in package.json and pnpm-lock.yaml to their latest versions for compatibility and security improvements. --- .../src/app/author/author.controller.spec.ts | 20 ------------------- apps/backend/src/app/author/author.module.ts | 9 --------- .../app/authors/authors.controller.spec.ts | 20 +++++++++++++++++++ .../authors.controller.ts} | 10 +++++----- .../backend/src/app/authors/authors.module.ts | 9 +++++++++ .../authors.service.spec.ts} | 10 +++++----- .../authors.service.ts} | 2 +- 7 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 apps/backend/src/app/author/author.controller.spec.ts delete mode 100644 apps/backend/src/app/author/author.module.ts create mode 100644 apps/backend/src/app/authors/authors.controller.spec.ts rename apps/backend/src/app/{author/author.controller.ts => authors/authors.controller.ts} (78%) create mode 100644 apps/backend/src/app/authors/authors.module.ts rename apps/backend/src/app/{author/author.service.spec.ts => authors/authors.service.spec.ts} (51%) rename apps/backend/src/app/{author/author.service.ts => authors/authors.service.ts} (65%) diff --git a/apps/backend/src/app/author/author.controller.spec.ts b/apps/backend/src/app/author/author.controller.spec.ts deleted file mode 100644 index 44cffa6..0000000 --- a/apps/backend/src/app/author/author.controller.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { AuthorController } from './author.controller'; -import { AuthorService } from './author.service'; - -describe('AuthorController', () => { - let controller: AuthorController; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - controllers: [AuthorController], - providers: [AuthorService], - }).compile(); - - controller = module.get(AuthorController); - }); - - it('should be defined', () => { - expect(controller).toBeDefined(); - }); -}); diff --git a/apps/backend/src/app/author/author.module.ts b/apps/backend/src/app/author/author.module.ts deleted file mode 100644 index e0e32c6..0000000 --- a/apps/backend/src/app/author/author.module.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Module } from '@nestjs/common'; -import { AuthorService } from './author.service'; -import { AuthorController } from './author.controller'; - -@Module({ - controllers: [AuthorController], - providers: [AuthorService], -}) -export class AuthorModule {} diff --git a/apps/backend/src/app/authors/authors.controller.spec.ts b/apps/backend/src/app/authors/authors.controller.spec.ts new file mode 100644 index 0000000..fd4a443 --- /dev/null +++ b/apps/backend/src/app/authors/authors.controller.spec.ts @@ -0,0 +1,20 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { AuthorsController } from 'apps/backend/src/app/authors/authors.controller'; +import { AuthorsService } from 'apps/backend/src/app/authors/authors.service'; + +describe('AuthorsController', () => { + let controller: AuthorsController; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + controllers: [AuthorsController], + providers: [AuthorsService], + }).compile(); + + controller = module.get(AuthorsController); + }); + + it('should be defined', () => { + expect(controller).toBeDefined(); + }); +}); diff --git a/apps/backend/src/app/author/author.controller.ts b/apps/backend/src/app/authors/authors.controller.ts similarity index 78% rename from apps/backend/src/app/author/author.controller.ts rename to apps/backend/src/app/authors/authors.controller.ts index 3b60c69..cf222a9 100644 --- a/apps/backend/src/app/author/author.controller.ts +++ b/apps/backend/src/app/authors/authors.controller.ts @@ -1,9 +1,9 @@ import { Controller, DefaultValuePipe, Delete, Get, Param, ParseIntPipe, Post, Query } from '@nestjs/common'; -import { AuthorService } from './author.service'; +import { AuthorsService } from 'apps/backend/src/app/authors/authors.service'; -@Controller('author') -export class AuthorController { - constructor(private readonly authorService: AuthorService) {} +@Controller('authors') +export class AuthorsController { + constructor(private readonly authorService: AuthorsService) {} @Get() async findMany( @@ -27,7 +27,7 @@ export class AuthorController { } - //GET files associated to author with limit and offset + //GET files associated to authors with limit and offset @Get(":authorId") async getForAuthor( @Query("limit", new DefaultValuePipe(20), ParseIntPipe) limit: number, diff --git a/apps/backend/src/app/authors/authors.module.ts b/apps/backend/src/app/authors/authors.module.ts new file mode 100644 index 0000000..f09496e --- /dev/null +++ b/apps/backend/src/app/authors/authors.module.ts @@ -0,0 +1,9 @@ +import { Module } from '@nestjs/common'; +import { AuthorsService } from 'apps/backend/src/app/authors/authors.service'; +import { AuthorsController } from 'apps/backend/src/app/authors/authors.controller'; + +@Module({ + controllers: [AuthorsController], + providers: [AuthorsService], +}) +export class AuthorsModule {} diff --git a/apps/backend/src/app/author/author.service.spec.ts b/apps/backend/src/app/authors/authors.service.spec.ts similarity index 51% rename from apps/backend/src/app/author/author.service.spec.ts rename to apps/backend/src/app/authors/authors.service.spec.ts index 4a56e64..1a19df0 100644 --- a/apps/backend/src/app/author/author.service.spec.ts +++ b/apps/backend/src/app/authors/authors.service.spec.ts @@ -1,15 +1,15 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { AuthorService } from './author.service'; +import { AuthorsService } from 'apps/backend/src/app/authors/authors.service'; -describe('AuthorService', () => { - let service: AuthorService; +describe('AuthorsService', () => { + let service: AuthorsService; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ - providers: [AuthorService], + providers: [AuthorsService], }).compile(); - service = module.get(AuthorService); + service = module.get(AuthorsService); }); it('should be defined', () => { diff --git a/apps/backend/src/app/author/author.service.ts b/apps/backend/src/app/authors/authors.service.ts similarity index 65% rename from apps/backend/src/app/author/author.service.ts rename to apps/backend/src/app/authors/authors.service.ts index fd036d1..4fd5760 100644 --- a/apps/backend/src/app/author/author.service.ts +++ b/apps/backend/src/app/authors/authors.service.ts @@ -1,4 +1,4 @@ import { Injectable } from '@nestjs/common'; @Injectable() -export class AuthorService {} +export class AuthorsService {}