chore: update access token generator

This commit is contained in:
Steven
2023-09-20 20:48:34 +08:00
parent ae1e22931f
commit 5cec1a71da
9 changed files with 136 additions and 122 deletions

View File

@ -70,10 +70,8 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
try {
await userServiceClient.createUserAccessToken({
username: currentUser.username,
userAccessToken: {
description: state.description,
expiresAt: new Date(Date.now() + state.expiration * 1000),
},
description: state.description,
expiresAt: state.expiration ? new Date(Date.now() + state.expiration * 1000) : undefined,
});
onConfirm();