refactor(community): add edit community funciton (#153)
This commit is contained in:
parent
21fcce96ed
commit
0f84fd2621
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue