Skip to content

Commit 834390f

Browse files
committed
feat: add controller for skip data and type
1 parent f455545 commit 834390f

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { CatchControllerError } from 'decorators/errors'
2+
import { ResponseCode } from 'utils/const'
3+
import SkipDataAndType from 'services/skip-data-and-type'
4+
5+
export default class SkipDataAndTypeController {
6+
@CatchControllerError
7+
public static async update(open: boolean): Promise<Controller.Response<boolean>> {
8+
SkipDataAndType.getInstance().update(open)
9+
10+
return {
11+
status: ResponseCode.Success,
12+
result: open,
13+
}
14+
}
15+
16+
@CatchControllerError
17+
public static async get(): Promise<Controller.Response<boolean>> {
18+
const open = SkipDataAndType.getInstance().get()
19+
20+
return {
21+
status: ResponseCode.Success,
22+
result: open,
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)