Change GET APIs to PUT apis (#8693)

* Endpoint should be more specific, causes issue in case we have enitities containing login, config etc in name

* Endpoint should be more specific, causes issue in case we have enitities containing login, config etc in name

* Change GET APIs to PUT apis #8687

* change request type for registration

Co-authored-by: Ashish Gupta <ashish@getcollate.io>
This commit is contained in:
Mohit Yadav 2022-11-14 19:25:26 +05:30 committed by GitHub
parent e5abdc8c5c
commit c88aac896b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -787,7 +787,7 @@ public class UserResource extends EntityResource<User, UserRepository> {
.build();
}
@GET
@PUT
@Path("/registrationConfirmation")
@Operation(
operationId = "confirmUserEmail",
@ -808,7 +808,7 @@ public class UserResource extends EntityResource<User, UserRepository> {
return Response.status(Response.Status.OK).entity("Email Verified Successfully").build();
}
@GET
@PUT
@Path("/resendRegistrationToken")
@Operation(
operationId = "resendRegistrationToken",

View File

@ -68,7 +68,7 @@ export const resetPassword = async (payload: PasswordResetRequest) => {
};
export const confirmRegistration = async (token: string) => {
const response = await axiosClient.get(
const response = await axiosClient.put(
`${apiPath}/registrationConfirmation?token=${token}`
);
@ -76,7 +76,7 @@ export const confirmRegistration = async (token: string) => {
};
export const resendRegistrationToken = async () => {
const response = await axiosClient.get(`${apiPath}/resendRegistrationToken`);
const response = await axiosClient.put(`${apiPath}/resendRegistrationToken`);
return response;
};