Files
api.portfolio/app/controllers/informations_controller.js
2026-02-25 00:34:39 +01:00

20 lines
645 B
JavaScript

import Information from '#models/information';
export default class InformationsController {
async show({ response }) {
const info = await Information.first();
if (!info) {
return response.notFound({ data: null });
}
return response.ok({
data: {
name: info.name,
headline: info.headline,
contact: info.contact,
linkedin: info.linkedin,
github: info.github,
birthday: info.birthday?.toISODate() ?? null,
},
});
}
}
//# sourceMappingURL=informations_controller.js.map