Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/server/api/routes/share/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const ResponseSchema = z.object({
}),
});

export const _delete = withAuthApiV1
export const deleteOne = withAuthApiV1
.createRoute({
method: "delete",
path: "/v1/{companyId}/shares/{id}",
Expand Down
6 changes: 6 additions & 0 deletions src/server/api/routes/share/getMany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ export const getMany = withAuthApiV1
.withCursor({
limit: query.limit,
after: query.cursor,
getCursor({ id }) {
return id;
},
parseCursor(cursor) {
return { id: cursor };
},
});

const response: z.infer<typeof ResponseSchema> = {
Expand Down
4 changes: 2 additions & 2 deletions src/server/api/routes/share/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { PublicAPI } from "@/server/api/hono";
import { create } from "./create";
import { _delete } from "./delete";
import { deleteOne } from "./delete";
import { getMany } from "./getMany";
import { getOne } from "./getOne";
import { update } from "./update";

export const registerShareRoutes = (api: PublicAPI) => {
api.openapi(_delete.route, _delete.handler);
api.openapi(deleteOne.route, deleteOne.handler);
api.openapi(getOne.route, getOne.handler);
api.openapi(getMany.route, getMany.handler);
api.openapi(create.route, create.handler);
Expand Down