fix: code review
This commit is contained in:
parent
e252a7a17f
commit
4cda8d8835
|
@ -51,10 +51,6 @@ method init*(self: Controller) =
|
||||||
method getAllCommunities*(self: Controller): seq[CommunityDto] =
|
method getAllCommunities*(self: Controller): seq[CommunityDto] =
|
||||||
result = self.communityService.getAllCommunities()
|
result = self.communityService.getAllCommunities()
|
||||||
|
|
||||||
self.events.on(SIGNAL_COMMUNITY_CATEGORY_REORDERED) do(e:Args):
|
|
||||||
let args = CommunityCategoryOrderArgs(e)
|
|
||||||
# self.delegate.communityCategoryReordered()
|
|
||||||
|
|
||||||
method joinCommunity*(self: Controller, communityId: string): string =
|
method joinCommunity*(self: Controller, communityId: string): string =
|
||||||
self.communityService.joinCommunity(communityId)
|
self.communityService.joinCommunity(communityId)
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,6 @@ const SIGNAL_COMMUNITY_CHANNEL_DELETED* = "communityChannelDeleted"
|
||||||
const SIGNAL_COMMUNITY_CATEGORY_CREATED* = "communityCategoryCreated"
|
const SIGNAL_COMMUNITY_CATEGORY_CREATED* = "communityCategoryCreated"
|
||||||
const SIGNAL_COMMUNITY_CATEGORY_EDITED* = "communityCategoryEdited"
|
const SIGNAL_COMMUNITY_CATEGORY_EDITED* = "communityCategoryEdited"
|
||||||
const SIGNAL_COMMUNITY_CATEGORY_DELETED* = "communityCategoryDeleted"
|
const SIGNAL_COMMUNITY_CATEGORY_DELETED* = "communityCategoryDeleted"
|
||||||
const SIGNAL_COMMUNITY_CATEGORY_REORDERED* = "communityCategoryReordered"
|
|
||||||
const SIGNAL_COMMUNITY_MEMBER_APPROVED* = "communityMemberApproved"
|
const SIGNAL_COMMUNITY_MEMBER_APPROVED* = "communityMemberApproved"
|
||||||
|
|
||||||
QtObject:
|
QtObject:
|
||||||
|
@ -660,13 +659,6 @@ QtObject:
|
||||||
let error = Json.decode($response.error, RpcError)
|
let error = Json.decode($response.error, RpcError)
|
||||||
raise newException(RpcException, "Error reordering community category: " & error.message)
|
raise newException(RpcException, "Error reordering community category: " & error.message)
|
||||||
|
|
||||||
self.events.emit(SIGNAL_COMMUNITY_CATEGORY_REORDERED,
|
|
||||||
CommunityCategoryOrderArgs(
|
|
||||||
communityId: communityId,
|
|
||||||
categoryId: categoryId,
|
|
||||||
position: position
|
|
||||||
)
|
|
||||||
)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
error "Error reordering category channel", msg = e.msg, communityId, categoryId, position
|
error "Error reordering category channel", msg = e.msg, communityId, categoryId, position
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue