refactor: standardize quotation marks across all files and improve code consistency

This commit is contained in:
Julien Froidefond
2025-11-27 11:40:30 +01:00
parent cc1e8c20a6
commit b2efade4d5
107 changed files with 9471 additions and 5952 deletions

View File

@@ -1,5 +1,5 @@
import { prisma } from "@/lib/prisma"
import type { Account } from "@/lib/types"
import { prisma } from "@/lib/prisma";
import type { Account } from "@/lib/types";
export const accountService = {
async create(data: Omit<Account, "id">): Promise<Account> {
@@ -14,7 +14,7 @@ export const accountService = {
currency: data.currency,
lastImport: data.lastImport,
},
})
});
return {
id: created.id,
@@ -26,10 +26,13 @@ export const accountService = {
balance: created.balance,
currency: created.currency,
lastImport: created.lastImport,
}
};
},
async update(id: string, data: Partial<Omit<Account, "id">>): Promise<Account> {
async update(
id: string,
data: Partial<Omit<Account, "id">>,
): Promise<Account> {
const updated = await prisma.account.update({
where: { id },
data: {
@@ -42,7 +45,7 @@ export const accountService = {
currency: data.currency,
lastImport: data.lastImport,
},
})
});
return {
id: updated.id,
@@ -54,14 +57,13 @@ export const accountService = {
balance: updated.balance,
currency: updated.currency,
lastImport: updated.lastImport,
}
};
},
async delete(id: string): Promise<void> {
// Transactions will be deleted automatically due to onDelete: Cascade
await prisma.account.delete({
where: { id },
})
});
},
}
};