fix import bugs

This commit is contained in:
Martina 2021-08-18 13:12:57 -07:00
parent 8048383468
commit 2de540bc86
4 changed files with 6 additions and 47 deletions

View File

@ -67,13 +67,10 @@ export default function ProfileInfo({ owner, viewer, time, action, onAction }) {
/>
<div css={STYLES_MOBILE_ALIGN}>
<span>
<H4 color="textBlack" css={[STYLES_TEXT_BLACK, Styles.HEADING_04]}>
<H4 color="textBlack" css={[STYLES_TEXT_BLACK, Styles.H4]}>
{username}
</H4>
<H4
color="textBlack"
css={[STYLES_TEXT_BLACK, Styles.HEADING_04, Styles.MOBILE_HIDDEN]}
>
<H4 color="textBlack" css={[STYLES_TEXT_BLACK, Styles.H4, Styles.MOBILE_HIDDEN]}>
&nbsp;&nbsp;
</H4>
<P2 color="textGrayDark" style={{ display: "inline" }}>

View File

@ -51,3 +51,6 @@ export const SENDGRID_WEBHOOK_KEY = process.env.SENDGRID_WEBHOOK_KEY;
//NOTE(martina): iFramely
export const IFRAMELY_API_KEY = process.env.IFRAMELY_API_KEY;
//NOTE(martina): Microlink
export const MICROLINK_API_KEY = process.env.MICROLINK_API_KEY;

View File

@ -1,5 +1,5 @@
import * as React from "react";
import * as System from "~/dist";
import * as System from "~/components/system";
import { css } from "@emotion/react";

View File

@ -1,41 +0,0 @@
import * as Data from "~/node_common/data";
import * as Utilities from "~/node_common/utilities";
import * as ViewerManager from "~/node_common/managers/viewer";
import * as SearchManager from "~/node_common/managers/search";
import * as RequestUtilities from "~/node_common/request-utilities";
export default async (req, res) => {
const userInfo = await RequestUtilities.checkAuthorizationInternal(req, res);
if (!userInfo) return;
const { id, user } = userInfo;
if (!req.body.data?.id) {
return res.status(500).send({ decorator: "SERVER_TOGGLE_FILE_PRIVACY_NO_FILE", error: true });
}
let file = req.body.data;
let response = await Data.updateFilePrivacy({
ownerId: file.ownerId,
id: file.id,
isPublic: file.isPublic,
});
if (!response || response.error) {
return res
.status(500)
.send({ decorator: "SERVER_TOGGLE_FILE_PRIVACY_UPDATE_FAILED", error: true });
}
if (response.isPublic) {
SearchManager.updateFile(response, "ADD");
} else {
SearchManager.updateFile(response, "REMOVE");
}
ViewerManager.hydratePartial(id, { library: true, slates: true });
return res.status(200).send({
decorator: "SERVER_TOGGLE_FILE_PRIVACY",
data: {},
});
};