fix: added missing return for star/unstar service method
This commit is contained in:
@@ -271,13 +271,6 @@ describe('UserHistoryService', () => {
|
|||||||
test('Should resolve left and error out due to invalid request ID', async () => {
|
test('Should resolve left and error out due to invalid request ID', async () => {
|
||||||
mockPrisma.userHistory.findFirst.mockResolvedValueOnce(null);
|
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(
|
return expect(
|
||||||
await userHistoryService.starUnstarRequestInHistory('abc', '1'),
|
await userHistoryService.starUnstarRequestInHistory('abc', '1'),
|
||||||
).toEqualLeft(USER_HISTORY_NOT_FOUND);
|
).toEqualLeft(USER_HISTORY_NOT_FOUND);
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ export class UserHistoryService {
|
|||||||
);
|
);
|
||||||
return E.right(updatedUserHistory);
|
return E.right(updatedUserHistory);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
E.left(USER_HISTORY_NOT_FOUND);
|
return E.left(USER_HISTORY_NOT_FOUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user