mirror of https://gitlab.com/ecentrics/concordia
Apostolos Fanakis
4 years ago
15 changed files with 65 additions and 23 deletions
@ -1 +1 @@ |
|||||
export const FORUM = 'Forum'; |
export const FORUM_CONTRACT = 'Forum'; |
||||
|
@ -0,0 +1,13 @@ |
|||||
|
export const USER_SIGNED_UP_EVENT = 'USER_SIGNED_UP'; |
||||
|
export const USERNAME_UPDATED_EVENT = 'USERNAME_UPDATED'; |
||||
|
export const TOPIC_CREATED_EVENT = 'TOPIC_CREATED'; |
||||
|
export const POST_CREATED_EVENT = 'POST_CREATED'; |
||||
|
|
||||
|
const forumContractEvents = [ |
||||
|
USER_SIGNED_UP_EVENT, |
||||
|
USERNAME_UPDATED_EVENT, |
||||
|
TOPIC_CREATED_EVENT, |
||||
|
POST_CREATED_EVENT, |
||||
|
]; |
||||
|
|
||||
|
export default forumContractEvents; |
@ -1,4 +1,20 @@ |
|||||
export const FORUM_EVENT_USER_SIGNED_UP = 'UserSignedUp'; |
import { |
||||
export const FORUM_EVENT_USERNAME_UPDATED = 'UsernameUpdated'; |
POST_CREATED_EVENT, |
||||
export const FORUM_EVENT_TOPIC_CREATED = 'TopicCreated'; |
TOPIC_CREATED_EVENT, |
||||
export const FORUM_EVENT_POST_CREATED = 'PostCreated'; |
USER_SIGNED_UP_EVENT, |
||||
|
USERNAME_UPDATED_EVENT, |
||||
|
} from '../../constants/ForumContractEvents'; |
||||
|
|
||||
|
export const FORUM_EVENT_USER_SIGNED_UP = 'FORUM_EVENT_USER_SIGNED_UP'; |
||||
|
export const FORUM_EVENT_USERNAME_UPDATED = 'FORUM_EVENT_USERNAME_UPDATED'; |
||||
|
export const FORUM_EVENT_TOPIC_CREATED = 'FORUM_EVENT_TOPIC_CREATED'; |
||||
|
export const FORUM_EVENT_POST_CREATED = 'FORUM_EVENT_POST_CREATED'; |
||||
|
|
||||
|
const eventActionMap = { |
||||
|
[USER_SIGNED_UP_EVENT]: FORUM_EVENT_USER_SIGNED_UP, |
||||
|
[USERNAME_UPDATED_EVENT]: FORUM_EVENT_USERNAME_UPDATED, |
||||
|
[TOPIC_CREATED_EVENT]: FORUM_EVENT_TOPIC_CREATED, |
||||
|
[POST_CREATED_EVENT]: FORUM_EVENT_POST_CREATED, |
||||
|
}; |
||||
|
|
||||
|
export default eventActionMap; |
||||
|
Loading…
Reference in new issue