viewer: adds trusted relationships, subscriptions, and activity to the viewer model

This commit is contained in:
@wwwjim 2020-08-25 15:24:01 -07:00
parent 06f02c7882
commit 785cecaeb6
2 changed files with 8 additions and 0 deletions

View File

@ -444,6 +444,8 @@ export default class ApplicationPage extends React.Component {
};
render() {
console.log({ viewer: this.state.viewer });
// NOTE(jim): Not authenticated.
if (!this.state.viewer) {
return (

View File

@ -19,6 +19,9 @@ export const getById = async ({ id }) => {
let data = null;
const slates = await Data.getSlatesByUserId({ userId: id });
const keys = await Data.getAPIKeysByUserId({ userId: id });
const subscriptions = await Data.getSubscriptionsByUserId({ userId: id });
const activity = await Data.getActivityForUserId({ userId: id });
const trusted = await Data.getTrustedRelationshipsByUserId({ userId: id });
let bytes = 0;
user.data.library[0].children.forEach((each) => {
@ -50,6 +53,9 @@ export const getById = async ({ id }) => {
status: null,
addrsList: null,
info: null,
subscriptions,
activity,
trusted,
};
} catch (e) {
console.log(e);