mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-25 09:15:19 +03:00
chore(api): remove unsused apis
This commit is contained in:
parent
a01ba3d9f9
commit
bb5d770c1e
@ -1,21 +0,0 @@
|
||||
import * as ViewerManager from "~/node_common/managers/viewer";
|
||||
import * as Utilities from "~/node_common/utilities";
|
||||
|
||||
export default async (req, res) => {
|
||||
const id = Utilities.getIdFromCookie(req);
|
||||
if (!id) {
|
||||
return res.status(401).send({ decorator: "SERVER_NOT_AUTHENTICATED", error: true });
|
||||
}
|
||||
|
||||
const data = await ViewerManager.getDealHistory({ id });
|
||||
|
||||
if (!data) {
|
||||
return res.status(500).send({
|
||||
decorator: "SERVER_FILECOIN_NETWORK_DEALS_ERROR",
|
||||
error: true,
|
||||
data: null,
|
||||
});
|
||||
}
|
||||
|
||||
return res.status(200).send({ decorator: "SERVER_FILECOIN_NETWORK_DEALS", success: true, data });
|
||||
};
|
@ -1,21 +0,0 @@
|
||||
import * as ViewerManager from "~/node_common/managers/viewer";
|
||||
import * as Utilities from "~/node_common/utilities";
|
||||
|
||||
export default async (req, res) => {
|
||||
const id = Utilities.getIdFromCookie(req);
|
||||
if (!id) {
|
||||
return res.status(401).send({ decorator: "SERVER_NOT_AUTHENTICATED", error: true });
|
||||
}
|
||||
|
||||
const data = await ViewerManager.getTextileById({ id });
|
||||
|
||||
if (!data) {
|
||||
return res.status(500).send({
|
||||
decorator: "SERVER_FILECOIN_NETWORK_ERROR",
|
||||
error: true,
|
||||
data: null,
|
||||
});
|
||||
}
|
||||
|
||||
return res.status(200).send({ decorator: "SERVER_FILECOIN_NETWORK", success: true, data });
|
||||
};
|
Loading…
Reference in New Issue
Block a user