Compare commits
No commits in common. "0c94d16b1945d1ed6a34698684ce7a7230c9ab8c" and "e9318220103f8258508eeb6bdbed9eda3703bba8" have entirely different histories.
0c94d16b19
...
e931822010
@ -6,37 +6,39 @@ import {
|
||||
Param,
|
||||
ParseIntPipe,
|
||||
Post,
|
||||
Query, UseGuards
|
||||
} from '@nestjs/common';
|
||||
Query,
|
||||
} from "@nestjs/common";
|
||||
import { AuthorsService } from "apps/backend/src/app/authors/authors.service";
|
||||
import { AdminGuard } from 'apps/backend/src/app/auth/auth.guard';
|
||||
|
||||
@Controller("authors")
|
||||
export class AuthorsController {
|
||||
constructor(private readonly authorService: AuthorsService) {}
|
||||
|
||||
@Get("find")
|
||||
@Get()
|
||||
async findMany(
|
||||
@Query("limit", new DefaultValuePipe(20), ParseIntPipe) limit: number,
|
||||
@Query("offset", new DefaultValuePipe(0), ParseIntPipe) offset: number,
|
||||
@Query("search", new DefaultValuePipe("")) search: string,
|
||||
) {}
|
||||
) {
|
||||
const query = { limit, offset, search };
|
||||
}
|
||||
|
||||
//TODO DTO
|
||||
//POST a new group
|
||||
@Post("new")
|
||||
async newAuthor() {}
|
||||
|
||||
@UseGuards(AdminGuard)
|
||||
@Delete(":autor")
|
||||
async deleteAuthor(@Param("machineId") machineId: string) {}
|
||||
//DELETE a group
|
||||
@Delete(":authorId")
|
||||
async deleteAuthor(@Param("authorId") authorId: string) {}
|
||||
|
||||
//TODO Patch
|
||||
|
||||
@Get(":author/files")
|
||||
async getFilesForAuthor(
|
||||
//GET files associated to authors with limit and offset
|
||||
@Get(":authorId")
|
||||
async getForAuthor(
|
||||
@Query("limit", new DefaultValuePipe(20), ParseIntPipe) limit: number,
|
||||
@Query("offset", new DefaultValuePipe(0), ParseIntPipe) offset: number,
|
||||
@Query("search", new DefaultValuePipe("")) search: string,
|
||||
@Param("machineId") machineId: string,
|
||||
) {}
|
||||
@Param("authorId") authorId: string,
|
||||
) {
|
||||
const query = { limit, offset, search };
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ export class GroupsController {
|
||||
@Query("search", new DefaultValuePipe("")) search: string,
|
||||
) {}
|
||||
|
||||
//TODO DTO
|
||||
@Post("new")
|
||||
async newGroup() {}
|
||||
|
||||
|
@ -24,7 +24,6 @@ export class MachinesController {
|
||||
@Query("search", new DefaultValuePipe("")) search: string,
|
||||
) {}
|
||||
|
||||
//TODO DTO
|
||||
@UseGuards(AdminGuard)
|
||||
@Post("new")
|
||||
async newMachine() {}
|
||||
@ -35,8 +34,6 @@ export class MachinesController {
|
||||
|
||||
//TODO Patch
|
||||
|
||||
//TODO CRUD fileType associated to machine
|
||||
|
||||
@Get(":machineId/files")
|
||||
async getFilesForMachine(
|
||||
@Query("limit", new DefaultValuePipe(20), ParseIntPipe) limit: number,
|
||||
|
Loading…
x
Reference in New Issue
Block a user