feat: add API key expiry options (#7064)
* feat: add API key expiry options * review
This commit is contained in:
@@ -18,7 +18,7 @@ router.post(
|
||||
validate(T.APIKeysCreateSchema),
|
||||
transaction(),
|
||||
async (ctx: APIContext<T.APIKeysCreateReq>) => {
|
||||
const { name } = ctx.input.body;
|
||||
const { name, expiresAt } = ctx.input.body;
|
||||
const { user } = ctx.state.auth;
|
||||
const { transaction } = ctx.state;
|
||||
|
||||
@@ -27,6 +27,7 @@ router.post(
|
||||
{
|
||||
name,
|
||||
userId: user.id,
|
||||
expiresAt,
|
||||
},
|
||||
{ transaction }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user