fix: added missing return for star/unstar service method
This commit is contained in:
parent
0c9aa2f681
commit
cd4750fcce
2 changed files with 1 additions and 8 deletions
|
|
@ -271,13 +271,6 @@ describe('UserHistoryService', () => {
|
|||
test('Should resolve left and error out due to invalid request ID', async () => {
|
||||
mockPrisma.userHistory.findFirst.mockResolvedValueOnce(null);
|
||||
|
||||
return expect(
|
||||
await userHistoryService.starUnstarRequestInHistory('abc', '1'),
|
||||
).toEqualLeft(USER_HISTORY_NOT_FOUND);
|
||||
});
|
||||
test('Should resolve left and error out due to invalid request ID', async () => {
|
||||
mockPrisma.userHistory.findFirst.mockResolvedValueOnce(null);
|
||||
|
||||
return expect(
|
||||
await userHistoryService.starUnstarRequestInHistory('abc', '1'),
|
||||
).toEqualLeft(USER_HISTORY_NOT_FOUND);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ export class UserHistoryService {
|
|||
);
|
||||
return E.right(updatedUserHistory);
|
||||
} catch (e) {
|
||||
E.left(USER_HISTORY_NOT_FOUND);
|
||||
return E.left(USER_HISTORY_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue