mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Ship legacy migrate APIs, portfolio/blog old-id schema, and admin migrate/purge flows.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
7244b70e90
commit
4598add88c
@@ -11,6 +11,7 @@ import sharp from 'sharp';
|
||||
import { AuthUser } from '../auth/auth.types';
|
||||
import { PermissionsService } from '../auth/permissions.service';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { businessBrandFaviconKey } from '../storage/storage-keys';
|
||||
import { StorageService } from '../storage/storage.service';
|
||||
import { UpdateBusinessProfileDto } from './dto/update-business-profile.dto';
|
||||
import {
|
||||
@@ -251,7 +252,7 @@ export class BusinessProfileService {
|
||||
) {
|
||||
const business = await this.prisma.business.findUnique({
|
||||
where: { id: businessId },
|
||||
select: { slug: true },
|
||||
select: { id: true },
|
||||
});
|
||||
if (!business) return;
|
||||
|
||||
@@ -302,7 +303,7 @@ export class BusinessProfileService {
|
||||
.toBuffer();
|
||||
|
||||
const fileName = `${randomUUID()}-favicon.png`;
|
||||
const storageKey = `businesses/${business.slug}/${businessId}/media/${fileName}`;
|
||||
const storageKey = businessBrandFaviconKey(businessId, fileName);
|
||||
const stored = await this.storage.upload({
|
||||
key: storageKey,
|
||||
body: faviconBuffer,
|
||||
|
||||
Reference in New Issue
Block a user