feat(api): add stats chart endpoint for admin access with time series data
feat(dayjs): integrate dayjs for date handling and formatting across the application refactor(routes): update date handling in id-tags, transactions, users, and dashboard routes to use dayjs style(globals): improve CSS variable definitions for better readability and consistency deps: add dayjs as a dependency for date manipulation
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Hono } from "hono";
|
||||
import { desc, eq, sql } from "drizzle-orm";
|
||||
import dayjs from "dayjs";
|
||||
import { useDrizzle } from "@/lib/db.js";
|
||||
import { chargePoint, connector } from "@/db/schema.js";
|
||||
import type { HonoEnv } from "@/types/hono.ts";
|
||||
@@ -135,7 +136,7 @@ app.patch("/:id", async (c) => {
|
||||
chargePointVendor?: string;
|
||||
chargePointModel?: string;
|
||||
updatedAt: Date;
|
||||
} = { updatedAt: new Date() };
|
||||
} = { updatedAt: dayjs().toDate() };
|
||||
|
||||
if (body.feePerKwh !== undefined) {
|
||||
if (!Number.isInteger(body.feePerKwh) || body.feePerKwh < 0) {
|
||||
|
||||
Reference in New Issue
Block a user