mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-25 22:28:00 -05:00
add ethereumAddress to getBoxProfile
This commit is contained in:
committed by
Hammad Jutt
parent
f79e8cd261
commit
af728ac53d
@@ -18,6 +18,7 @@ type UpdateBoxProfileResponse {
|
||||
}
|
||||
|
||||
type BoxProfile {
|
||||
ethereumAddress : String
|
||||
name : String
|
||||
description : String
|
||||
location : String
|
||||
|
||||
@@ -8,11 +8,12 @@ const handler = async (req: Request, res: Response) => {
|
||||
const { address } = req.body.input;
|
||||
const boxProfile = await Box.getProfile(address);
|
||||
|
||||
if(Object.keys(boxProfile).length === 0) {
|
||||
if (Object.keys(boxProfile).length === 0) {
|
||||
return res.json({});
|
||||
}
|
||||
|
||||
const parsedProfile: BoxProfile = {
|
||||
ethereumAddress: address,
|
||||
name: boxProfile.name,
|
||||
description: boxProfile.description,
|
||||
location: boxProfile.location,
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
type Maybe<T> = T | null
|
||||
|
||||
|
||||
type Maybe<T> = T | null;
|
||||
|
||||
type BoxProfile = {
|
||||
name: string|null,
|
||||
description: string|null,
|
||||
location: string|null,
|
||||
job: string|null,
|
||||
emoji: string|null,
|
||||
imageUrl: string|null,
|
||||
}
|
||||
ethereumAddress: string | null;
|
||||
name: string | null;
|
||||
description: string | null;
|
||||
location: string | null;
|
||||
job: string | null;
|
||||
emoji: string | null;
|
||||
imageUrl: string | null;
|
||||
};
|
||||
|
||||
type UpdateBoxProfileResponse = {
|
||||
success: boolean;
|
||||
|
||||
Reference in New Issue
Block a user