You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/api/components/index.ts
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -205,6 +205,7 @@ export function withRoles<T extends FastifyZodOpenApiSchema>(
205
205
...schema.response,
206
206
};
207
207
return{
208
+
...schema,
208
209
security,
209
210
"x-required-roles": roles,
210
211
"x-disable-api-key-auth": disableApiKeyAuth,
@@ -232,7 +233,6 @@ ${schema.description}
232
233
<hr />
233
234
${roles.length>0 ? `Requires any of the following roles:\n\n${roles.map((item)=>`* ${AppRoleHumanMapper[item]} (<code>${item}</code>)`).join("\n")}` : "Requires valid authentication but no specific authorization."}
234
235
`,
235
-
...schema,
236
236
response: responses,
237
237
};
238
238
}
@@ -241,11 +241,21 @@ export function withTags<T extends FastifyZodOpenApiSchema>(
"If the user has bypass permissions, all links will be returned. Otherwise, only links owned by the current user, or delegated to the current user, will be returned.",
95
+
response: {
96
+
200: {
97
+
description: "The current user's links have been retrieved.",
98
+
content: {
99
+
"application/json": {
100
+
schema: z.object({
101
+
ownedLinks: z
102
+
.array(
103
+
z.object({
104
+
slug: linkrySlug,
105
+
createdAt: z.iso.datetime(),
106
+
updatedAt: z.iso.datetime(),
107
+
redirect: linkryRedirectTarget,
108
+
access: linkryAccessList,
109
+
}),
110
+
)
111
+
.meta({
112
+
description:
113
+
"A list of all links that the current user owns.",
0 commit comments