refactoring on back end

This commit is contained in:
Mikayla Dobson
2022-12-17 13:30:55 -06:00
parent be375aad8f
commit 9a43f58ee3
15 changed files with 117 additions and 90 deletions

View File

@@ -5,10 +5,10 @@ export default class ControllerResponse<T> implements CtlResponse<T> {
code: StatusCode
data: T | string
constructor(ok: boolean, code: StatusCode, data: T | string) {
this.ok = ok
constructor(code: StatusCode, data: T | string, ok?: boolean) {
this.code = code
this.data = data
this.ok = ok || (this.data !== null)
}
send() {