Skip to content

Commit

Permalink
fix(folders): improved jobpost folders impl
Browse files Browse the repository at this point in the history
  • Loading branch information
AndySakov committed Nov 20, 2024
1 parent b3b0a98 commit 4297093
Show file tree
Hide file tree
Showing 2 changed files with 421 additions and 8 deletions.
32 changes: 31 additions & 1 deletion src/jobs/jobs.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,40 @@ export class JobsController {
},
})
async getUserJobFolderBySlug(
@Session() { address }: SessionObject,
@Param("slug") slug: string,
): Promise<ResponseWithOptionalData<JobpostFolder>> {
this.logger.log(`/jobs/folders/:slug`);
return this.jobsService.getUserJobFolderBySlug(slug);
const res = await this.jobsService.getUserJobFolderBySlug(address, slug);
if (res.success) {
return res;
} else {
throw new NotFoundException(res);
}
}

@Get("/folders/public/:slug")
@ApiOkResponse({
description:
"Returns the details of a public job folder with the passed slug",
schema: {
allOf: [
{
$ref: getSchemaPath(Response<JobpostFolder>),
},
],
},
})
async getPublicJobFolderBySlug(
@Param("slug") slug: string,
): Promise<ResponseWithOptionalData<JobpostFolder>> {
this.logger.log(`/jobs/folders/public/:slug`);
const res = await this.jobsService.getPublicJobFolderBySlug(slug);
if (res.success) {
return res;
} else {
throw new NotFoundException(res);
}
}

@Post("/org/:id/applicants")
Expand Down
Loading

0 comments on commit 4297093

Please sign in to comment.