This commit is contained in:
Rutra
2026-05-13 11:50:22 +02:00
commit 2068229f89
128 changed files with 9215 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import BrandColor from '#models/brand_color';
import BrandFont from '#models/brand_font';
export default class BrandsController {
async show({}) {
const colors = await BrandColor.all();
const fonts = await BrandFont.all();
return { colors, fonts };
}
async update({ request }) {
const { colors, fonts } = request.only(['colors', 'fonts']);
if (colors) {
await BrandColor.truncate();
await BrandColor.createMany(colors);
}
if (fonts) {
await BrandFont.truncate();
await BrandFont.createMany(fonts);
}
return this.show({ request });
}
}
//# sourceMappingURL=brands_controller.js.map