refactor(community): add edit community funciton (#153)

This commit is contained in:
Jonathan Rainville 2022-01-06 09:20:18 -05:00 committed by saledjenic
parent 21fcce96ed
commit 0f84fd2621
1 changed files with 28 additions and 0 deletions

View File

@ -49,6 +49,34 @@ proc createCommunity*(
"imageBy": bY "imageBy": bY
}]) }])
proc editCommunity*(
communityId: string,
name: string,
description: string,
access: int,
ensOnly: bool,
color: string,
imageUrl: string,
aX: int,
aY: int,
bX: int,
bY: int
): RpcResponse[JsonNode] {.raises: [Exception].} =
result = callPrivateRPC("editCommunity".prefix, %*[{
# TODO this will need to be renamed membership (small m)
"CommunityID": communityId,
"Membership": access,
"name": name,
"description": description,
"ensOnly": ensOnly,
"color": color,
"image": imageUrl,
"imageAx": aX,
"imageAy": aY,
"imageBx": bX,
"imageBy": bY
}])
proc createCommunityChannel*( proc createCommunityChannel*(
communityId: string, communityId: string,
name: string, name: string,