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.
This commit is contained in:
parent
a6b0768ecc
commit
a9cd71995d
@ -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>(AuthorController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
@ -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 {}
|
20
apps/backend/src/app/authors/authors.controller.spec.ts
Normal file
20
apps/backend/src/app/authors/authors.controller.spec.ts
Normal file
@ -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>(AuthorsController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
@ -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,
|
9
apps/backend/src/app/authors/authors.module.ts
Normal file
9
apps/backend/src/app/authors/authors.module.ts
Normal file
@ -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 {}
|
@ -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>(AuthorService);
|
||||
service = module.get<AuthorsService>(AuthorsService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
@ -1,4 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class AuthorService {}
|
||||
export class AuthorsService {}
|
Loading…
x
Reference in New Issue
Block a user