Skip to content

Commit

Permalink
[bugfix] fix list UBI managers (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardo Vieira authored Sep 27, 2023
1 parent 4539a1b commit 0f35cab
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
21 changes: 21 additions & 0 deletions packages/api/src/routes/v2/community/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ export default (route: Router): void => {
* tags:
* - "communities"
* summary: Edit pending community submission
* parameters:
* - in: path
* name: id
* schema:
* type: integer
* required: true
* description: community id
* requestBody:
* required: true
* content:
Expand Down Expand Up @@ -182,6 +189,13 @@ export default (route: Router): void => {
* tags:
* - "communities"
* summary: Edit community review
* parameters:
* - in: path
* name: id
* schema:
* type: integer
* required: true
* description: community id
* requestBody:
* required: true
* content:
Expand Down Expand Up @@ -209,6 +223,13 @@ export default (route: Router): void => {
* tags:
* - "communities"
* summary: Edit a valid community
* parameters:
* - in: path
* name: id
* schema:
* type: integer
* required: true
* description: community id
* requestBody:
* required: true
* content:
Expand Down
6 changes: 6 additions & 0 deletions packages/api/src/routes/v2/community/details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ export default (route: Router): void => {
* - "communities"
* summary: Get community managers
* parameters:
* - in: path
* name: id
* schema:
* type: integer
* required: true
* description: community id
* - in: query
* name: state
* schema:
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/subgraph/queries/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export async function queryAndTransformResponse<T, Y>(
return JSON.parse(cacheResults);
}
const response = await axiosSubgraph.post<SubgraphResponse<T>>('', graphqlQuery);
const transformedResponse = transform ? transform(response.data.data) : response.data.data;
const transformedResponse = transform
? transform(response.data.data[graphqlQuery.operationName])
: response.data.data[graphqlQuery.operationName];
redisClient.set(
graphqlQuery.query,
JSON.stringify(transformedResponse),
Expand Down

0 comments on commit 0f35cab

Please sign in to comment.