Merge branch 'staging' into preprod
This commit is contained in:
commit
36fd9ca25f
@ -50,6 +50,26 @@ export default class DocumentsReminderController extends ApiController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get ("/api/v1/notary/document_reminders/count", [authHandler])
|
||||||
|
protected async count(req: Request, response: Response) {
|
||||||
|
try {
|
||||||
|
//get query
|
||||||
|
let query: Prisma.DocumentsReminderCountArgs = {};
|
||||||
|
|
||||||
|
//call service to get prisma entity
|
||||||
|
const count = await this.documentsReminderService.count(query);
|
||||||
|
const responseData = {
|
||||||
|
count: count
|
||||||
|
}
|
||||||
|
|
||||||
|
//success
|
||||||
|
this.httpSuccess(response, responseData);
|
||||||
|
} catch (error) {
|
||||||
|
this.httpInternalError(response, error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @description Get a specific document by uid
|
// * @description Get a specific document by uid
|
||||||
// */
|
// */
|
||||||
|
@ -43,4 +43,8 @@ export default class DocumentsReminderRepository extends BaseRepository {
|
|||||||
|
|
||||||
return documentReminderCreated;
|
return documentReminderCreated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async count (query: Prisma.DocumentsReminderCountArgs) {
|
||||||
|
return this.model.count(query);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,4 +25,8 @@ export default class DocumentsReminderService extends BaseService {
|
|||||||
public async create(document: DocumentReminder): Promise<DocumentsReminder> {
|
public async create(document: DocumentReminder): Promise<DocumentsReminder> {
|
||||||
return this.documentsReminderRepository.create(document);
|
return this.documentsReminderRepository.create(document);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async count (query: Prisma.DocumentsReminderCountArgs) {
|
||||||
|
return this.documentsReminderRepository.count(query);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user