import { FormGroup } from '@angular/forms'
import { About } from '@shared/models/server'
import { InstanceService } from '@app/shared/instance/instance.service'
+import { HooksService } from '@app/core/plugins/hooks.service'
import { NgbAccordion } from '@ng-bootstrap/ng-bootstrap'
@Component({
private serverService: ServerService,
private redirectService: RedirectService,
private instanceService: InstanceService,
+ private hooks: HooksService,
private i18n: I18n
) {
}
err => this.notifier.error(err.message)
)
+
+ this.hooks.runAction('action:signup.register.init', 'signup')
}
hasSameChannelAndAccountNames () {
if (this.accordion) this.accordion.toggle('code-of-conduct')
}
- signup () {
+ async signup () {
this.error = null
- const body: UserRegister = Object.assign(this.formStepUser.value, { channel: this.formStepChannel.value })
+ const body: UserRegister = await this.hooks.wrapObject(
+ Object.assign(this.formStepUser.value, { channel: this.formStepChannel.value }),
+ 'filter:api.signup.registration.create.params'
+ )
this.userService.signup(body).subscribe(
() => {