All files / src/services brandService.ts

100% Statements 17/17
100% Branches 2/2
50% Functions 1/2
100% Lines 13/13

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 132x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 26x
// src/services/brandService.ts
import * as db from './db/index.db';
import type { Logger } from 'pino';
 
class BrandService {
  async updateBrandLogo(brandId: number, file: Express.Multer.File, logger: Logger): Promise<string> {
    const logoUrl = `/flyer-images/${file.filename}`;
    await db.adminRepo.updateBrandLogo(brandId, logoUrl, logger);
    return logoUrl;
  }
}
 
export const brandService = new BrandService();