Skip to content

Commit

Permalink
fix: fix typecheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelilahOu committed Feb 6, 2025
1 parent 54db204 commit 5508848
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions apps/api/src/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@ export const waterMeterReadings = sqliteTable("water_meter_readings", {

export type InsertUser = typeof users.$inferInsert;
export type SelectUser = typeof users.$inferSelect;
export type SelectSession = typeof sessions.$inferSelect;
9 changes: 0 additions & 9 deletions apps/api/src/db/types.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
export type {
InsertUser,
SelectUser,
InsertSession,
SelectSession,
InsertAccount,
SelectAccount,
InsertVerification,
SelectVerification,
InsertWaterMeter,
SelectWaterMeter,
InsertReading,
SelectReading,
} from "./schema";
4 changes: 2 additions & 2 deletions apps/mobile/src/components/readings/update-reading-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { fetch } from "@tauri-apps/plugin-http";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { SERVER_URL } from "../../../env";
import type { SelectReading } from "@dorf/api/src/db/schema";
import type { SelectReadingType } from "@dorf/api/src/routes/readings";

const updateReadingSchema = z.object({
amount: z.coerce
Expand All @@ -34,7 +34,7 @@ const updateReadingSchema = z.object({
type UpdateReadingSchema = z.infer<typeof updateReadingSchema>;

type Props = {
reading: SelectReading;
reading: SelectReadingType;
token: string;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { fetch } from "@tauri-apps/plugin-http";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { SERVER_URL } from "../../../env";
import type { SelectWaterMeter } from "@dorf/api/src/db/schema";
import type { SelectWaterMeterType } from "@dorf/api/src/routes/water-meters";

const updateWaterMeterSchema = z.object({
id: z.string().min(1, { message: "Water meter ID is required" }),
Expand All @@ -34,7 +34,7 @@ const updateWaterMeterSchema = z.object({
type UpdateWaterMeterSchema = z.infer<typeof updateWaterMeterSchema>;

type Props = {
waterMeter: SelectWaterMeter;
waterMeter: SelectWaterMeterType;
token: string;
};

Expand Down

0 comments on commit 5508848

Please sign in to comment.