Skip to content

Commit

Permalink
[Task] #175, show created time when logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
Type-Style committed Oct 16, 2024
1 parent 471c47c commit 243f6ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/pages/Start.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function Start() {
<>
<strong className="info noDivider">GPS:</strong>
<span className="info">{entries.at(-1).lat} / {entries.at(-1).lon}</span>
<span className="info">{timeAgo(entries.at(-1).time.created)}</span>
<span className="info">{contextObj.isLoggedIn ? timeAgo(entries.at(-1).time.created) : entries.at(-1).time.createdString}</span>
</>
}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function createJWT(req: Request, res: Response) {
date: dateString,
user: req.body.user
};
const token = jwt.sign(payload, key, { expiresIn: 60 * 0.25 });
const token = jwt.sign(payload, key, { expiresIn: 60 * 29 });
res.locals.token = token;
return token;
}

0 comments on commit 243f6ce

Please sign in to comment.