mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-22 08:45:24 +00:00
♻️ use put and return 200 OK
This commit is contained in:
@@ -734,7 +734,7 @@ authenticated.post(
|
|||||||
resource.setResourcePolicyUsers
|
resource.setResourcePolicyUsers
|
||||||
);
|
);
|
||||||
|
|
||||||
authenticated.post(
|
authenticated.put(
|
||||||
"/resource-policy/:resourcePolicyId/password",
|
"/resource-policy/:resourcePolicyId/password",
|
||||||
verifyResourcePolicyAccess,
|
verifyResourcePolicyAccess,
|
||||||
verifyLimits,
|
verifyLimits,
|
||||||
@@ -743,7 +743,7 @@ authenticated.post(
|
|||||||
policy.setResourcePolicyPassword
|
policy.setResourcePolicyPassword
|
||||||
);
|
);
|
||||||
|
|
||||||
authenticated.post(
|
authenticated.put(
|
||||||
"/resource-policy/:resourcePolicyId/pincode",
|
"/resource-policy/:resourcePolicyId/pincode",
|
||||||
verifyResourcePolicyAccess,
|
verifyResourcePolicyAccess,
|
||||||
verifyLimits,
|
verifyLimits,
|
||||||
@@ -752,7 +752,7 @@ authenticated.post(
|
|||||||
policy.setResourcePolicyPincode
|
policy.setResourcePolicyPincode
|
||||||
);
|
);
|
||||||
|
|
||||||
authenticated.post(
|
authenticated.put(
|
||||||
"/resource-policy/:resourcePolicyId/header-auth",
|
"/resource-policy/:resourcePolicyId/header-auth",
|
||||||
verifyResourcePolicyAccess,
|
verifyResourcePolicyAccess,
|
||||||
verifyLimits,
|
verifyLimits,
|
||||||
|
|||||||
@@ -632,7 +632,7 @@ authenticated.put(
|
|||||||
policy.setResourcePolicyAccessControl
|
policy.setResourcePolicyAccessControl
|
||||||
);
|
);
|
||||||
|
|
||||||
authenticated.post(
|
authenticated.put(
|
||||||
"/resource-policy/:resourcePolicyId/password",
|
"/resource-policy/:resourcePolicyId/password",
|
||||||
verifyApiKeyResourcePolicyAccess,
|
verifyApiKeyResourcePolicyAccess,
|
||||||
verifyLimits,
|
verifyLimits,
|
||||||
@@ -641,7 +641,7 @@ authenticated.post(
|
|||||||
policy.setResourcePolicyPassword
|
policy.setResourcePolicyPassword
|
||||||
);
|
);
|
||||||
|
|
||||||
authenticated.post(
|
authenticated.put(
|
||||||
"/resource-policy/:resourcePolicyId/pincode",
|
"/resource-policy/:resourcePolicyId/pincode",
|
||||||
verifyApiKeyResourcePolicyAccess,
|
verifyApiKeyResourcePolicyAccess,
|
||||||
verifyLimits,
|
verifyLimits,
|
||||||
@@ -650,7 +650,7 @@ authenticated.post(
|
|||||||
policy.setResourcePolicyPincode
|
policy.setResourcePolicyPincode
|
||||||
);
|
);
|
||||||
|
|
||||||
authenticated.post(
|
authenticated.put(
|
||||||
"/resource-policy/:resourcePolicyId/header-auth",
|
"/resource-policy/:resourcePolicyId/header-auth",
|
||||||
verifyApiKeyResourcePolicyAccess,
|
verifyApiKeyResourcePolicyAccess,
|
||||||
verifyLimits,
|
verifyLimits,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const setResourcePolicyHeaderAuthBodySchema = z.strictObject({
|
|||||||
});
|
});
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
method: "post",
|
method: "put",
|
||||||
path: "/resource-policy/{resourcePolicyId}/header-auth",
|
path: "/resource-policy/{resourcePolicyId}/header-auth",
|
||||||
description:
|
description:
|
||||||
"Set or update the header authentication for a resource policy. If user and password is not provided, it will remove the header authentication.",
|
"Set or update the header authentication for a resource policy. If user and password is not provided, it will remove the header authentication.",
|
||||||
@@ -100,7 +100,7 @@ export async function setResourcePolicyHeaderAuth(
|
|||||||
success: true,
|
success: true,
|
||||||
error: false,
|
error: false,
|
||||||
message: "Header Authentication set successfully",
|
message: "Header Authentication set successfully",
|
||||||
status: HttpCode.CREATED
|
status: HttpCode.OK
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const setResourcePolicyPasswordBodySchema = z.strictObject({
|
|||||||
});
|
});
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
method: "post",
|
method: "put",
|
||||||
path: "/resource-policy/{resourcePolicyId}/password",
|
path: "/resource-policy/{resourcePolicyId}/password",
|
||||||
description:
|
description:
|
||||||
"Set the password for a resource policy. Setting the password to null will remove it.",
|
"Set the password for a resource policy. Setting the password to null will remove it.",
|
||||||
@@ -95,7 +95,7 @@ export async function setResourcePolicyPassword(
|
|||||||
success: true,
|
success: true,
|
||||||
error: false,
|
error: false,
|
||||||
message: "Resource policy password set successfully",
|
message: "Resource policy password set successfully",
|
||||||
status: HttpCode.CREATED
|
status: HttpCode.OK
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const setResourcePolicyPincodeBodySchema = z.strictObject({
|
|||||||
});
|
});
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
method: "post",
|
method: "put",
|
||||||
path: "/resource-policy/{resourcePolicyId}/pincode",
|
path: "/resource-policy/{resourcePolicyId}/pincode",
|
||||||
description:
|
description:
|
||||||
"Set the PIN code for a resource policy. Setting the PIN code to null will remove it.",
|
"Set the PIN code for a resource policy. Setting the PIN code to null will remove it.",
|
||||||
@@ -98,7 +98,7 @@ export async function setResourcePolicyPincode(
|
|||||||
success: true,
|
success: true,
|
||||||
error: false,
|
error: false,
|
||||||
message: "Resource policy PIN code set successfully",
|
message: "Resource policy PIN code set successfully",
|
||||||
status: HttpCode.CREATED
|
status: HttpCode.OK
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user