แก้pathข้อมูลบุคคล
This commit is contained in:
parent
c22d33fa60
commit
4c67904018
8 changed files with 367 additions and 369 deletions
|
|
@ -19,7 +19,7 @@ import HttpStatusCode from "../interfaces/http-status";
|
|||
import HttpError from "../interfaces/http-error";
|
||||
import { CreateRelationship, Relationship } from "../entities/Relationship";
|
||||
import { Not } from "typeorm";
|
||||
@Route("api/v1/org/relationship")
|
||||
@Route("api/v1/org/metadata/relationship")
|
||||
@Tags("Relationship")
|
||||
@Security("bearerAuth")
|
||||
@Response(
|
||||
|
|
@ -83,7 +83,7 @@ export class RelationshipController extends Controller {
|
|||
}
|
||||
|
||||
const checkName = await this.relationshipRepository.findOne({
|
||||
where: {id:Not(id),name: requestBody.name },
|
||||
where: { id: Not(id), name: requestBody.name },
|
||||
});
|
||||
|
||||
if (checkName) {
|
||||
|
|
@ -156,8 +156,8 @@ export class RelationshipController extends Controller {
|
|||
@Get()
|
||||
async listRelationship() {
|
||||
const relationship = await this.relationshipRepository.find({
|
||||
select: ["id", "name" , "createdAt" , "lastUpdatedAt" , "createdFullName" , "lastUpdateFullName"],
|
||||
order:{ createdAt:"ASC" }
|
||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
||||
order: { createdAt: "ASC" },
|
||||
});
|
||||
if (!relationship) {
|
||||
return new HttpSuccess([]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue