feat(FN-094): add comment line for deployment verification
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled

- Added a comment line to main.ts for deployment verification purposes
This commit is contained in:
Fusion
2026-05-11 02:07:03 +00:00
parent c72f063a25
commit f4fea1e429
274 changed files with 20712 additions and 6305 deletions

View File

@@ -1,8 +1,8 @@
import { Controller, Get, Post, Patch, Param, Body, UseGuards } from "@nestjs/common";
import { BrandsService } from "./brands.service";
import { Body, Controller, Get, Param, Patch, Post, UseGuards } from "@nestjs/common";
import { Public } from "../common/decorators/public.decorator";
import { Roles } from "../common/decorators/roles.decorator";
import { RolesGuard } from "../common/guards/roles.guard";
import { BrandsService } from "./brands.service";
@Controller("brands")
export class BrandsController {

View File

@@ -1,13 +1,22 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { NotFoundException } from "@nestjs/common";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { BrandsService } from "./brands.service";
function createMockDb(overrides: Record<string, unknown> = {}) {
function chainable(terminalValue: unknown) {
const chain: Record<string, unknown> = {};
const methods = [
"select", "from", "where", "orderBy", "limit", "offset",
"insert", "values", "update", "set", "returning",
"select",
"from",
"where",
"orderBy",
"limit",
"offset",
"insert",
"values",
"update",
"set",
"returning",
];
for (const m of methods) chain[m] = vi.fn().mockReturnValue(chain);
chain.limit = vi.fn().mockReturnValue(terminalValue);
@@ -41,7 +50,10 @@ describe("BrandsService", () => {
});
it("should return all brands when activeOnly is false", async () => {
const brands = [{ id: "b1", name: "BMW" }, { id: "b2", name: "Audi" }];
const brands = [
{ id: "b1", name: "BMW" },
{ id: "b2", name: "Audi" },
];
// When activeOnly=false, chain is: select().from().orderBy() — no where
const chain: Record<string, any> = {
from: vi.fn().mockReturnThis(),

View File

@@ -1,6 +1,6 @@
import { Inject, Injectable, NotFoundException } from "@nestjs/common";
import { eq } from "drizzle-orm";
import { DATABASE, Database } from "../database/database.provider";
import { DATABASE, type Database } from "../database/database.provider";
import { brands } from "../database/schema/core";
@Injectable()
@@ -30,7 +30,10 @@ export class BrandsService {
return brand;
}
async update(id: string, data: { name?: string; slug?: string; logoUrl?: string; isActive?: boolean }) {
async update(
id: string,
data: { name?: string; slug?: string; logoUrl?: string; isActive?: boolean },
) {
const [brand] = await this.db
.update(brands)
.set({ ...data, updatedAt: new Date() })