feat: Implement new get app auth clients API endpoint

This commit is contained in:
Faruk AYDIN
2024-03-26 23:58:35 +01:00
parent 01ae96840e
commit e3bf599bf6
6 changed files with 20 additions and 28 deletions

View File

@@ -0,0 +1,11 @@
import { renderObject } from '../../../../helpers/renderer.js';
import AppAuthClient from '../../../../models/app-auth-client.js';
export default async (request, response) => {
const appAuthClient = await AppAuthClient.query()
.findById(request.params.appAuthClientId)
.where({ app_key: request.params.appKey, active: true })
.throwIfNotFound();
renderObject(response, appAuthClient);
};