aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/system/debug/debug.component.ts
blob: 1f4e71e8ac59a2c97385ce28c9d4b55598eec4ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { Component, OnInit } from '@angular/core'
import { Notifier } from '@app/core'
import { Debug } from '@shared/models'
import { DebugService } from './debug.service'

@Component({
  templateUrl: './debug.component.html',
  styleUrls: [ './debug.component.scss' ]
})
export class DebugComponent implements OnInit {
  debug: Debug

  constructor (
    private debugService: DebugService,
    private notifier: Notifier
  ) {
  }

  ngOnInit (): void {
    this.load()
  }

  load () {
    this.debugService.getDebug()
        .subscribe({
          next: debug => this.debug = debug,

          error: err => this.notifier.error(err.message)
        })
  }
}