|
@@ -153,11 +153,11 @@ export class SlackCtrl {
|
|
|
const installation = await this.installationRepository.findByTeamIdOrEnterpriseId(installationId!);
|
|
const installation = await this.installationRepository.findByTeamIdOrEnterpriseId(installationId!);
|
|
|
|
|
|
|
|
const payload = JSON.parse(body.payload);
|
|
const payload = JSON.parse(body.payload);
|
|
|
- const { type } = payload;
|
|
|
|
|
|
|
+ const callBackId = payload?.view?.callback_id;
|
|
|
|
|
|
|
|
// register
|
|
// register
|
|
|
// response_urls is an array but the element included is only one.
|
|
// response_urls is an array but the element included is only one.
|
|
|
- if (type === 'view_submission') {
|
|
|
|
|
|
|
+ if (callBackId === 'register') {
|
|
|
await this.registerService.upsertOrderRecord(this.orderRepository, installation, payload);
|
|
await this.registerService.upsertOrderRecord(this.orderRepository, installation, payload);
|
|
|
await this.registerService.notifyServerUriToSlack(authorizeResult, payload);
|
|
await this.registerService.notifyServerUriToSlack(authorizeResult, payload);
|
|
|
return;
|
|
return;
|