mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-28 11:00:06 +00:00
FIX: 404 in get public key
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { Controller, Post, Body, Put, Get} from '@nestjs/common';
|
import { Controller, Body, Put, Get, NotFoundException} from '@nestjs/common';
|
||||||
import { AssignService } from './assign.service';
|
import { AssignService } from './assign.service';
|
||||||
import { CreateAssignDto } from './dto/create-assign.dto';
|
import { CreateAssignDto } from './dto/create-assign.dto';
|
||||||
import { Authenticated, RequireModule, RequireSomePermission } from 'src/decorators/authentication.decorator';
|
import { Authenticated, RequireModule, RequireSomePermission } from 'src/decorators/authentication.decorator';
|
||||||
@@ -28,6 +28,10 @@ export class AssignController {
|
|||||||
@RequireModule(DADOSFERA_MODULES_KEYS.EMBED_ASSIGNED)
|
@RequireModule(DADOSFERA_MODULES_KEYS.EMBED_ASSIGNED)
|
||||||
async get(@User() user: RequestUser) {
|
async get(@User() user: RequestUser) {
|
||||||
const metadata = PackTheMetadata(user);
|
const metadata = PackTheMetadata(user);
|
||||||
return await this.assignService.get(metadata);
|
try {
|
||||||
|
return await this.assignService.get(metadata);
|
||||||
|
} catch (error) {
|
||||||
|
throw new NotFoundException(error.message)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user