Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhdanh27600 committed Sep 12, 2023
1 parent 3810b91 commit 569a82a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/[...hash].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
userAgent: context.req.headers['user-agent'],
ip,
});
if (!forwardUrl.history) throw 'Cannot found history to forward';
if (!forwardUrl.history) throw new Error('Cannot found history to forward');
return {
props: {
history: forwardUrl.history,
Expand Down
1 change: 0 additions & 1 deletion src/test/forward.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ describe('Test /api/forward...', () => {
await handler(req2, res2);
expect(res2._getStatusCode()).toBe(HttpStatusCode.OK);
const history2: UrlShortenerHistory = JSON.parse(res2._getData()).history;
console.log('history2', history2);
expect(history2.url).toEqual(history1.url);
});
});
Expand Down

0 comments on commit 569a82a

Please sign in to comment.