admin side for now | 🔄 started FE

This commit is contained in:
user
2025-10-21 13:11:31 +03:00
parent 3232542de1
commit 5f4e9fc7fc
65 changed files with 3605 additions and 1508 deletions

View File

@@ -50,10 +50,11 @@ export class ProductRepository {
}
}
async getProductById(id: number): Promise<Result<ProductModel>> {
async getProductById(id: number | string): Promise<Result<ProductModel>> {
try {
const result = await this.db.query.product.findFirst({
where: eq(product.id, id),
where:
typeof id === "number" ? eq(product.id, id) : eq(product.linkId, id),
});
if (!result) {