mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-29 00:35:19 +02:00
Unify put vs post
This commit is contained in:
@@ -19,7 +19,7 @@ const updateResourcePolicyBodySchema = z.strictObject({
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: "put",
|
||||
method: "post",
|
||||
path: "/resource-policy/{resourcePolicyId}",
|
||||
description: "Update a resource policy.",
|
||||
tags: [OpenAPITags.PublicResourcePolicy],
|
||||
@@ -37,7 +37,7 @@ registry.registerPath({
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: "put",
|
||||
method: "post",
|
||||
path: "/public-resource-policy/{resourcePolicyId}",
|
||||
description: "Update a resource policy.",
|
||||
tags: [OpenAPITags.PublicResourcePolicy],
|
||||
@@ -54,6 +54,44 @@ registry.registerPath({
|
||||
responses: {}
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: "put",
|
||||
path: "/resource-policy/{resourcePolicyId}",
|
||||
description: "Update a resource policy. Deprecated: use POST instead.",
|
||||
deprecated: true,
|
||||
tags: [OpenAPITags.PublicResourcePolicy],
|
||||
request: {
|
||||
params: updateResourcePolicyParamsSchema,
|
||||
body: {
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: updateResourcePolicyBodySchema
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
responses: {}
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: "put",
|
||||
path: "/public-resource-policy/{resourcePolicyId}",
|
||||
description: "Update a resource policy. Deprecated: use POST instead.",
|
||||
deprecated: true,
|
||||
tags: [OpenAPITags.PublicResourcePolicy],
|
||||
request: {
|
||||
params: updateResourcePolicyParamsSchema,
|
||||
body: {
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: updateResourcePolicyBodySchema
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
responses: {}
|
||||
});
|
||||
|
||||
export async function updateResourcePolicy(
|
||||
req: Request,
|
||||
res: Response,
|
||||
|
||||
Reference in New Issue
Block a user