All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 2m27s
18 lines
342 B
TypeScript
18 lines
342 B
TypeScript
import { db } from "../db/db.controller.js";
|
|
import { appStats } from "../db/schema/stats.schema.js";
|
|
|
|
export const updateAppStats = async (
|
|
data: Partial<typeof appStats.$inferInsert>,
|
|
) => {
|
|
await db
|
|
.insert(appStats)
|
|
.values({
|
|
id: "primary",
|
|
...data,
|
|
})
|
|
.onConflictDoUpdate({
|
|
target: appStats.id,
|
|
set: data,
|
|
});
|
|
};
|