mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-25 19:55:26 +03:00
fix import bugs
This commit is contained in:
parent
8048383468
commit
2de540bc86
@ -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]}>
|
||||
•
|
||||
</H4>
|
||||
<P2 color="textGrayDark" style={{ display: "inline" }}>
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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: {},
|
||||
});
|
||||
};
|
Loading…
Reference in New Issue
Block a user