refactor: use path util
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { Doc, Id } from "@fileone/convex/_generated/dataModel"
|
||||
import { joinPath, PATH_SEPARATOR } from "@fileone/path"
|
||||
import type {
|
||||
AuthenticatedMutationCtx,
|
||||
AuthenticatedQueryCtx,
|
||||
@@ -94,7 +95,7 @@ export async function create(
|
||||
userId: ctx.user._id,
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
path: parentDir ? `${parentDir.path}/${name}` : "/",
|
||||
path: parentDir ? joinPath(parentDir.path, name) : PATH_SEPARATOR,
|
||||
})
|
||||
}
|
||||
|
||||
|
@@ -2,6 +2,9 @@
|
||||
"name": "@fileone/convex",
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@fileone/path": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5",
|
||||
"convex": "^1.27.0"
|
||||
|
Reference in New Issue
Block a user