Initial commit
This commit is contained in:
20
app/controllers/informations_controller.js
Normal file
20
app/controllers/informations_controller.js
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
Reference in New Issue
Block a user