mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-25 09:15:19 +03:00
feat(managers/viewer): add views the viewer's payload
This commit is contained in:
parent
5c50b7652a
commit
f38957b6b9
@ -107,6 +107,13 @@ import createDeal from "~/node_common/data/methods/create-deal";
|
||||
// Surveys
|
||||
import createSurvey from "~/node_common/data/methods/create-survey";
|
||||
|
||||
// NOTE(amine)
|
||||
// Views
|
||||
import getViewById from "~/node_common/data/methods/get-view-by-id";
|
||||
import getViewsByUserId from "~/node_common/data/methods/get-views-by-user-id";
|
||||
import createView from "~/node_common/data/methods/create-view";
|
||||
import deleViewById from "~/node_common/data/methods/delete-view-by-id";
|
||||
|
||||
export {
|
||||
// NOTE(jim): One-offs
|
||||
createOrphan,
|
||||
@ -191,4 +198,9 @@ export {
|
||||
createDeal,
|
||||
//NOTE(amine): Surveys
|
||||
createSurvey,
|
||||
//NOTE(amine): Views
|
||||
getViewsByUserId,
|
||||
getViewById,
|
||||
createView,
|
||||
deleViewById,
|
||||
};
|
||||
|
@ -152,9 +152,10 @@ export const getById = async ({ id }) => {
|
||||
|
||||
// user.library = await Data.getFilesByUserId({ id });
|
||||
|
||||
const [slates, keys, subscriptions, following, followers] = (
|
||||
const [slates, views, keys, subscriptions, following, followers] = (
|
||||
await Promise.allSettled([
|
||||
Data.getSlatesByUserId({ ownerId: id, includeFiles: true }),
|
||||
Data.getViewsByUserId({ ownerId: id }),
|
||||
Data.getAPIKeysByUserId({ userId: id }),
|
||||
Data.getSubscriptionsByUserId({ ownerId: id }),
|
||||
Data.getFollowingByUserId({ ownerId: id }),
|
||||
@ -224,6 +225,7 @@ export const getById = async ({ id }) => {
|
||||
// userBucketCID: bucketRoot?.path || null,
|
||||
keys,
|
||||
slates,
|
||||
views,
|
||||
subscriptions,
|
||||
following,
|
||||
followers,
|
||||
|
Loading…
Reference in New Issue
Block a user