Skip to content

Commit

Permalink
Merge pull request #18 from Finboost/dev-arman
Browse files Browse the repository at this point in the history
feat(api): update JWT accessToken expired and add profile data on users endpoint
  • Loading branch information
armandwipangestu authored Jun 10, 2024
2 parents 6a0ab9f + 7a3835d commit 833fcfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/auths.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const signInUserHandler = async (req, res) => {
const accessToken = generateJwtToken(
payloadJwt,
process.env.JWT_ACCESS_TOKEN_SECRET,
{ expiresIn: "30s" }
{ expiresIn: "1h" }
);

const refreshToken = generateJwtToken(
Expand Down
4 changes: 4 additions & 0 deletions src/repository/users.repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const findUsers = async (filters) => {
createdAt: true,
updatedAt: true,
role: true,
profile: true,
},
});

Expand All @@ -48,6 +49,7 @@ export const findUserById = async (userId) => {
createdAt: true,
updatedAt: true,
role: true,
profile: true,
},
});

Expand All @@ -70,6 +72,7 @@ export const findUserByEmail = async (email) => {
createdAt: true,
updatedAt: true,
role: true,
profile: true,
},
});

Expand All @@ -92,6 +95,7 @@ export const findUserByRefreshToken = async (refreshToken) => {
createdAt: true,
updatedAt: true,
role: true,
profile: true,
},
});

Expand Down

0 comments on commit 833fcfd

Please sign in to comment.