diff --git a/hasura/metadata/actions.graphql b/hasura/metadata/actions.graphql index 19eb7859..b7376481 100644 --- a/hasura/metadata/actions.graphql +++ b/hasura/metadata/actions.graphql @@ -18,6 +18,7 @@ type UpdateBoxProfileResponse { } type BoxProfile { + ethereumAddress : String name : String description : String location : String diff --git a/packages/backend/src/handlers/actions/getBoxProfile/handler.ts b/packages/backend/src/handlers/actions/getBoxProfile/handler.ts index d23466e7..8554298e 100644 --- a/packages/backend/src/handlers/actions/getBoxProfile/handler.ts +++ b/packages/backend/src/handlers/actions/getBoxProfile/handler.ts @@ -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, diff --git a/packages/backend/src/handlers/actions/types.ts b/packages/backend/src/handlers/actions/types.ts index a5e93df2..c60b67ca 100644 --- a/packages/backend/src/handlers/actions/types.ts +++ b/packages/backend/src/handlers/actions/types.ts @@ -1,15 +1,14 @@ -type Maybe = T | null - - +type Maybe = 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;