feat: Implement get app config API endpoint

This commit is contained in:
Faruk AYDIN
2024-03-07 14:18:21 +01:00
parent 79a792ac62
commit 95db6cca2c
6 changed files with 100 additions and 6 deletions

View File

@@ -0,0 +1,12 @@
import { renderObject } from '../../../../helpers/renderer.js';
import AppConfig from '../../../../models/app-config.js';
export default async (request, response) => {
const appConfig = await AppConfig.query()
.findOne({
key: request.params.appKey,
})
.throwIfNotFound();
renderObject(response, appConfig);
};