fix: work through how i want to return the api response with the data property being of the right type.

This commit is contained in:
StevanFreeborn
2023-02-01 21:21:39 -06:00
parent 5a6c5094e9
commit 4952bf30ec
9 changed files with 164 additions and 39 deletions
+1 -2
View File
@@ -15,8 +15,7 @@ export class ApiResponseFactory {
const message = this.TryToGetMessage(response);
if (this.isSuccessStatusCode(response.status) === true) {
const data = response.data as T;
return new ApiResponse<T>(response.status, message, data);
return new ApiResponse<T>(response.status, message, response.data);
}
return new ApiResponse<T>(response.status, message, null);