Skip to content

Commit

Permalink
feat: add controller for skip data and type
Browse files Browse the repository at this point in the history
  • Loading branch information
classicalliu committed Sep 3, 2019
1 parent f455545 commit 834390f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/neuron-wallet/src/controllers/skip-data-and-type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { CatchControllerError } from 'decorators/errors'
import { ResponseCode } from 'utils/const'
import SkipDataAndType from 'services/skip-data-and-type'

export default class SkipDataAndTypeController {
@CatchControllerError
public static async update(open: boolean): Promise<Controller.Response<boolean>> {
SkipDataAndType.getInstance().update(open)

return {
status: ResponseCode.Success,
result: open,
}
}

@CatchControllerError
public static async get(): Promise<Controller.Response<boolean>> {
const open = SkipDataAndType.getInstance().get()

return {
status: ResponseCode.Success,
result: open,
}
}
}

0 comments on commit 834390f

Please sign in to comment.