Skip to content

Commit 5dfbb8e

Browse files
committed
fix types
1 parent db72678 commit 5dfbb8e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

apps/web/lib/folder.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const getFolderById = Effect.fn(function* (folderId: string) {
2222
if (!folderId) throw new Error("Folder ID is required");
2323
const db = yield* Database;
2424

25-
const [folder] = yield* db.execute((db) =>
25+
const [folder] = yield* db.use((db) =>
2626
db
2727
.select()
2828
.from(folders)
@@ -69,7 +69,7 @@ const getSharedSpacesForVideos = Effect.fn(function* (
6969
const db = yield* Database;
7070

7171
// Fetch space-level sharing
72-
const spaceSharing = yield* db.execute((db) =>
72+
const spaceSharing = yield* db.use((db) =>
7373
db
7474
.select({
7575
videoId: spaceVideos.videoId,
@@ -90,7 +90,7 @@ const getSharedSpacesForVideos = Effect.fn(function* (
9090
);
9191

9292
// Fetch organization-level sharing
93-
const orgSharing = yield* db.execute((db) =>
93+
const orgSharing = yield* db.use((db) =>
9494
db
9595
.select({
9696
videoId: sharedVideos.videoId,
@@ -164,7 +164,7 @@ export const getVideosByFolderId = Effect.fn(function* (
164164
if (!folderId) throw new Error("Folder ID is required");
165165
const db = yield* Database;
166166

167-
const videoData = yield* db.execute((db) =>
167+
const videoData = yield* db.use((db) =>
168168
db
169169
.select({
170170
id: videos.id,
@@ -287,7 +287,7 @@ export const getChildFolders = Effect.fn(function* (
287287
const user = yield* CurrentUser;
288288
if (!user.activeOrganizationId) throw new Error("No active organization");
289289

290-
const childFolders = yield* db.execute((db) =>
290+
const childFolders = yield* db.use((db) =>
291291
db
292292
.select({
293293
id: folders.id,

0 commit comments

Comments
 (0)