import Profile from '#models/profile'; import Tag from '#models/tag'; export default class VtubersController { async show({}) { const profile = await Profile.firstOrFail(); const tags = await Tag.all(); return { ...profile.serialize(), tags: tags.map((t) => t.name) }; } async update({ request }) { const profile = await Profile.firstOrFail(); const data = request.only(['name', 'avatarUrl', 'backgroundImageUrl', 'title', 'description', 'aboutText']); profile.merge(data); await profile.save(); const tags = await Tag.all(); return { ...profile.serialize(), tags: tags.map((t) => t.name) }; } } //# sourceMappingURL=vtubers_controller.js.map