Skip to content

Commit

Permalink
Merge pull request #38 from JSPaste/dev
Browse files Browse the repository at this point in the history
fix NaN
  • Loading branch information
tnfAngel authored Jan 31, 2024
2 parents acb1cb4 + 604f05e commit e7ad082
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/classes/DocumentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ export class DocumentHandler {
key,
data,
url: viewDocumentPath + key,
expirationTimestamp: Number(res.expirationTimestamp)
expirationTimestamp: res.expirationTimestamp
? Number(res.expirationTimestamp)
: undefined
};
}
}
Expand Down
13 changes: 5 additions & 8 deletions src/routes/v2/access.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,11 @@ export default new Elysia({
.get(
':key/raw',
async ({ errorSender, request, query: { p }, params: { key } }) =>
DocumentHandler.handleRawAccess(
{
errorSender,
key,
password: request.headers.get('password') || p || ''
},
APIVersions.v2
),
DocumentHandler.handleRawAccess({
errorSender,
key,
password: request.headers.get('password') || p || ''
}),
{
params: t.Object(
{
Expand Down

0 comments on commit e7ad082

Please sign in to comment.