mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-23 13:17:54 -05:00
updated backend to read 3box collectiblesFavorite (#221)
* updated backend to read 3box collectiblesFavorite * removed unneccesary '?'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import Box, { Image } from '3box';
|
||||
import Box, { CollectiblesFavorite, Image } from '3box';
|
||||
|
||||
import { CONFIG } from '../../../../config';
|
||||
import {
|
||||
@@ -34,6 +34,9 @@ export const getBoxProfile: QueryResolvers['getBoxProfile'] = async (
|
||||
height: 300,
|
||||
}),
|
||||
website: boxProfile.website,
|
||||
collectiblesFavorites: getCollectiblesFavourites(
|
||||
boxProfile.collectiblesFavorites,
|
||||
),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -47,3 +50,13 @@ function getImage(
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function getCollectiblesFavourites(
|
||||
collectiblesFavorites: Array<CollectiblesFavorite> | null | undefined,
|
||||
) {
|
||||
if (!collectiblesFavorites) return [];
|
||||
return collectiblesFavorites.map(({ address, token_id }) => ({
|
||||
address,
|
||||
tokenId: token_id,
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -16,6 +16,12 @@ export const typeDefs = gql`
|
||||
imageUrl: String
|
||||
coverImageUrl: String
|
||||
website: String
|
||||
collectiblesFavorites: [CollectiblesFavorites!]
|
||||
}
|
||||
|
||||
type CollectiblesFavorites {
|
||||
address: String
|
||||
tokenId: String
|
||||
}
|
||||
|
||||
type Moloch {
|
||||
|
||||
@@ -358,6 +358,7 @@ enum AccountType_update_column {
|
||||
}
|
||||
|
||||
type BoxProfile {
|
||||
collectiblesFavorites: [CollectiblesFavorites!]
|
||||
coverImageUrl: String
|
||||
description: String
|
||||
emoji: String
|
||||
@@ -369,6 +370,11 @@ type BoxProfile {
|
||||
website: String
|
||||
}
|
||||
|
||||
type CollectiblesFavorites {
|
||||
address: String
|
||||
tokenId: String
|
||||
}
|
||||
|
||||
"""
|
||||
columns and relationships of "EnneagramType"
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user