File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ import * as Db from "@cap/database/schema";
33import { CurrentUser , Folder , Policy } from "@cap/web-domain" ;
44import * as Dz from "drizzle-orm" ;
55import { Effect , Option } from "effect" ;
6+ import { revalidatePath } from "next/cache" ;
67import { Database , type DatabaseError } from "../Database.ts" ;
78import { FoldersPolicy } from "./FoldersPolicy.ts" ;
8- import { revalidatePath } from "next/cache" ;
99
1010// @effect -diagnostics-next-line leakingRequirements:off
1111export class Folders extends Effect . Service < Folders > ( ) ( "Folders" , {
Original file line number Diff line number Diff line change 1+ import { HttpApiSchema } from "@effect/platform" ;
12import { Rpc , RpcGroup } from "@effect/rpc" ;
23import { Effect , Schema } from "effect" ;
3-
44import { RpcAuthMiddleware } from "./Authentication.ts" ;
55import { InternalError } from "./Errors.ts" ;
66import { PolicyDeniedError } from "./Policy.ts" ;
7- import { HttpApiSchema } from "@effect/platform" ;
87
98export const FolderId = Schema . String . pipe ( Schema . brand ( "FolderId" ) ) ;
109export type FolderId = typeof FolderId . Type ;
@@ -72,9 +71,10 @@ export class FolderRpcs extends RpcGroup.make(
7271 Rpc . make ( "FolderUpdate" , {
7372 payload : FolderUpdate ,
7473 error : Schema . Union (
75- NotFoundError ,
7674 RecursiveDefinitionError ,
7775 ParentNotFoundError ,
76+ PolicyDeniedError ,
77+ NotFoundError ,
7878 InternalError ,
7979 ) ,
8080 } ) . middleware ( RpcAuthMiddleware ) ,
You can’t perform that action at this time.
0 commit comments