Skip to content

Commit ba5bf6b

Browse files
do it goodly
1 parent 4793982 commit ba5bf6b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/web-backend/src/Folders/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import * as Db from "@cap/database/schema";
33
import { CurrentUser, Folder, Policy } from "@cap/web-domain";
44
import * as Dz from "drizzle-orm";
55
import { Effect, Option } from "effect";
6+
import { revalidatePath } from "next/cache";
67
import { Database, type DatabaseError } from "../Database.ts";
78
import { FoldersPolicy } from "./FoldersPolicy.ts";
8-
import { revalidatePath } from "next/cache";
99

1010
// @effect-diagnostics-next-line leakingRequirements:off
1111
export class Folders extends Effect.Service<Folders>()("Folders", {

packages/web-domain/src/Folder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
import { HttpApiSchema } from "@effect/platform";
12
import { Rpc, RpcGroup } from "@effect/rpc";
23
import { Effect, Schema } from "effect";
3-
44
import { RpcAuthMiddleware } from "./Authentication.ts";
55
import { InternalError } from "./Errors.ts";
66
import { PolicyDeniedError } from "./Policy.ts";
7-
import { HttpApiSchema } from "@effect/platform";
87

98
export const FolderId = Schema.String.pipe(Schema.brand("FolderId"));
109
export 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),

0 commit comments

Comments
 (0)