mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 10:46:44 -05:00
changing plurals to single and proper-casing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// db/queries.ts
|
||||
import { accounts } from '../schema/accounts'
|
||||
import { accounts } from '../schema/Account'
|
||||
import { db } from '../index';
|
||||
|
||||
// Fetch all accounts
|
||||
@@ -9,15 +9,15 @@ export async function getAllAccounts() {
|
||||
|
||||
// Add a new accounts
|
||||
export async function addAcounts(name: string) {
|
||||
return await db.insertInto(User).values({ name }).returning();
|
||||
return await db.insertInto(accounts).values({ name }).returning();
|
||||
}
|
||||
|
||||
// Update a user
|
||||
export async function updateUser(id: number, name: string) {
|
||||
return await db.update(User).set({ name }).where(User.id.equals(id));
|
||||
// Update a accounts
|
||||
export async function updateAcounts(id: number, name: string) {
|
||||
return await db.update(accounts).set({ name }).where(accounts.id.equals(id));
|
||||
}
|
||||
|
||||
// Delete a user
|
||||
export async function deleteUser(id: number) {
|
||||
return await db.deleteFrom(User).where(User.id.equals(id));
|
||||
// Delete a accounts
|
||||
export async function deleteAccount(id: number) {
|
||||
return await db.deleteFrom(accounts).where(accounts.id.equals(id));
|
||||
}
|
||||
Reference in New Issue
Block a user