Skip to content

Commit d8a85ca

Browse files
removed type errors
Signed-off-by: NishantSinghhhhh <[email protected]>
1 parent 0eb60de commit d8a85ca

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

scripts/dbManagement/helpers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
envConfigSchema,
1515
envSchemaAjv,
1616
} from "src/envConfigSchema";
17-
import { v4 as uuid } from "uuid";
17+
import { uuidv7 } from "uuidv7";
1818
const envConfig = envSchema<EnvConfig>({
1919
ajv: envSchemaAjv,
2020
dotenv: true,
@@ -592,7 +592,7 @@ export async function insertCollections(
592592
updaterId: string;
593593
}) => ({
594594
...action_item,
595-
id: action_item.id.length === 36 ? action_item.id : uuid(),
595+
id: action_item.id.length === 36 ? action_item.id : uuidv7(),
596596
assignedAt: parseDate(action_item.assignedAt),
597597
completionAt: parseDate(action_item.completionAt),
598598
createdAt: parseDate(action_item.createdAt),

src/graphql/types/Mutation/createActionItem.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { sql } from "drizzle-orm";
2-
import { v4 as uuid } from "uuid";
2+
import { uuidv7 } from "uuidv7";
33
import { actionItems } from "~/src/drizzle/tables/actionItems";
44
import { builder } from "~/src/graphql/builder";
55
import {
@@ -135,7 +135,7 @@ export const createActionItemCategoryMutation = builder.mutationField(
135135
const [createdActionItem] = await ctx.drizzleClient
136136
.insert(actionItems)
137137
.values({
138-
id: uuid(),
138+
id: uuidv7(),
139139
creatorId: currentUserId,
140140
categoryId: parsedArgs.input.categoryId,
141141
assigneeId: parsedArgs.input.assigneeId,

src/graphql/types/Mutation/createActionItemCategory.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { sql } from "drizzle-orm";
2-
import { v4 as uuid } from "uuid";
2+
import { uuidv7 } from "uuidv7";
33
import { actionItemCategories } from "~/src/drizzle/tables/actionItemCategories";
44
import { builder } from "~/src/graphql/builder";
55
import { TalawaGraphQLError } from "~/src/utilities/TalawaGraphQLError";
@@ -112,7 +112,7 @@ export const createActionItemCategoryMutation = builder.mutationField(
112112
const [createdCategory] = await ctx.drizzleClient
113113
.insert(actionItemCategories)
114114
.values({
115-
id: uuid(),
115+
id: uuidv7(),
116116
name: parsedArgs.input.name,
117117
organizationId: parsedArgs.input.organizationId,
118118
creatorId: currentUserId,

0 commit comments

Comments
 (0)