removed enableGalleryPublish, enableLinkInjection feature flags (#454)

* removed enableGalleryPublish, enableLinkInjection

* removed ENABLE_GALLERY_PUBLISH
This commit is contained in:
Srinath Narayanan
2021-02-26 13:07:44 -08:00
committed by GitHub
parent 3cc1945140
commit cf01ffa957
20 changed files with 163 additions and 130 deletions

View File

@@ -354,21 +354,13 @@ describe("Gallery", () => {
const author = "author";
const thumbnailUrl = "thumbnailUrl";
const content = `{ "key": "value" }`;
const addLinkToNotebookViewer = false;
const addLinkToNotebookViewer = true;
window.fetch = jest.fn().mockReturnValue({
status: HttpStatusCodes.OK,
json: () => undefined as any,
});
const response = await junoClient.publishNotebook(
name,
description,
tags,
author,
thumbnailUrl,
content,
addLinkToNotebookViewer
);
const response = await junoClient.publishNotebook(name, description, tags, author, thumbnailUrl, content);
const authorizationHeader = getAuthorizationHeader();
expect(response.status).toBe(HttpStatusCodes.OK);

View File

@@ -362,8 +362,7 @@ export class JunoClient {
tags: string[],
author: string,
thumbnailUrl: string,
content: string,
isLinkInjectionEnabled: boolean
content: string
): Promise<IJunoResponse<IGalleryItem>> {
const response = await window.fetch(`${this.getNotebooksSubscriptionIdAccountUrl()}/gallery`, {
method: "PUT",
@@ -375,7 +374,7 @@ export class JunoClient {
author,
thumbnailUrl,
content: JSON.parse(content),
addLinkToNotebookViewer: isLinkInjectionEnabled,
addLinkToNotebookViewer: true,
} as IPublishNotebookRequest),
});