Use GET instead of PATCH for some Juno endpoints (#431)

This commit is contained in:
Tanuj Mittal 2021-02-06 02:01:34 +05:30 committed by GitHub
parent f0b4737313
commit 4b442dd869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,10 +186,7 @@ export class JunoClient {
public async getPublicGalleryData(): Promise<IJunoResponse<IPublicGalleryData>> { public async getPublicGalleryData(): Promise<IJunoResponse<IPublicGalleryData>> {
const url = `${this.getNotebooksSubscriptionIdAccountUrl()}/gallery/public`; const url = `${this.getNotebooksSubscriptionIdAccountUrl()}/gallery/public`;
const response = await window.fetch(url, { const response = await window.fetch(url, { headers: JunoClient.getHeaders() });
method: "PATCH",
headers: JunoClient.getHeaders(),
});
let data: IPublicGalleryData; let data: IPublicGalleryData;
if (response.status === HttpStatusCodes.OK) { if (response.status === HttpStatusCodes.OK) {
@ -222,10 +219,7 @@ export class JunoClient {
public async isCodeOfConductAccepted(): Promise<IJunoResponse<boolean>> { public async isCodeOfConductAccepted(): Promise<IJunoResponse<boolean>> {
const url = `${this.getNotebooksSubscriptionIdAccountUrl()}/gallery/isCodeOfConductAccepted`; const url = `${this.getNotebooksSubscriptionIdAccountUrl()}/gallery/isCodeOfConductAccepted`;
const response = await window.fetch(url, { const response = await window.fetch(url, { headers: JunoClient.getHeaders() });
method: "PATCH",
headers: JunoClient.getHeaders(),
});
let data: boolean; let data: boolean;
if (response.status === HttpStatusCodes.OK) { if (response.status === HttpStatusCodes.OK) {