-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add controller for skip data and type
- Loading branch information
1 parent
f455545
commit 834390f
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
packages/neuron-wallet/src/controllers/skip-data-and-type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} | ||
} | ||
} |