1/** The app's own Effect HTTP endpoints. */
2import * as HttpApiEndpoint from "effect/http-api/HttpApiEndpoint";
3import * as HttpApiGroup from "effect/http-api/HttpApiGroup";
4import { Unauthorized, User } from "./auth.ts";
5
6/** Who am I. Signed-in only. */
7export const Me = HttpApiEndpoint.get("me", "/api/v1/me", {
8 success: User,
9 error: Unauthorized,
10});
11
12export class AppRoutes extends HttpApiGroup.make("app").add(Me) {}