Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix: 🐛 changed response to tagged union
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Yee committed Apr 18, 2024
1 parent 3ac9e7d commit 0cbaad2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
},
"packageManager": "[email protected]",
"engines": {
"node": "20",
"pnpm": "8"
}
}
5 changes: 4 additions & 1 deletion packages/types/types/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export type BaseResponse = {
* The status code of the request.
*/
statusCode: number;
success: boolean;
};

/**
Expand All @@ -26,6 +25,8 @@ export type Response<T> = BaseResponse & {
* The payload returned by the REST API.
*/
payload: T;

success: true;
};

/**
Expand All @@ -40,6 +41,8 @@ export type ErrorResponse = BaseResponse & {
* The detailed error message.
*/
message: string;

success: false;
};

/**
Expand Down

0 comments on commit 0cbaad2

Please sign in to comment.