Simplify EventStream handling

This commit is contained in:
Deluan
2023-05-17 11:22:36 -04:00
parent 6bee4ed147
commit 4296741ec0
5 changed files with 47 additions and 90 deletions
+4 -7
View File
@@ -2,13 +2,10 @@ export const EVENT_SCAN_STATUS = 'scanStatus'
export const EVENT_SERVER_START = 'serverStart'
export const EVENT_REFRESH_RESOURCE = 'refreshResource'
export const processEvent = (type, data) => {
return {
type,
data: data,
}
}
export const processEvent = (type, data) => ({
type,
data: data,
})
export const scanStatusUpdate = (data) => ({
type: EVENT_SCAN_STATUS,
data: data,