Spaces:
Sleeping
Sleeping
Download Backend_node/src/utils/ApiResponse.ts from VashuTheGreat2/ML-Learner: direct link, hf CLI and curl.
- Browser
- Download file 351 Bytes
-
https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/Backend_node/src/utils/ApiResponse.ts
- Command line
-
hf download hf://spaces/VashuTheGreat2/ML-Learner/Backend_node/src/utils/ApiResponse.ts
-
curl -L -o ApiResponse.ts https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/Backend_node/src/utils/ApiResponse.ts
351 Bytes
| class ApiResponse<T> { | |
| public status: number; | |
| public data: T; | |
| public message: string; | |
| public success: boolean; | |
| constructor(status = 200, data: T, message = "Success") { | |
| this.status = status; | |
| this.data = data; | |
| this.message = message; | |
| this.success = status < 400; | |
| } | |
| } | |
| export default ApiResponse; |