Skip to content

Commit

Permalink
fix: server add entrance_state_event
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuangs committed Oct 25, 2024
1 parent f5a34b6 commit fed14b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/update-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- "main"
- "feat/app-service"
tags:
- 'v*'

Expand Down
18 changes: 18 additions & 0 deletions packages/server2/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ export class AppController {
return returnSucceed(null);
}

@Post('/server/entrance_state_event')
async entrance_state_event(
@Body() event: ProviderRequest<Event<any>>,
): Promise<Result<null>> {
this.logger.debug('entrance_state_event');
this.logger.debug(JSON.stringify(event, null, 2));

const payload = event.data.data.payload;

broadcastWebsocketMessage({
event: 'entrance_state_event',
// data: event.data.data,
data: payload,
});

return returnSucceed(null);
}

@Post('/server/system_upgrade_event')
async system_upgrade_event(
@Body() event: ProviderRequest<Event<any>>,
Expand Down

0 comments on commit fed14b7

Please sign in to comment.