fix(back/AuthTokenController): fix auth tokens pagination size

This commit is contained in:
Alice Gaudon 2022-03-06 18:34:03 +01:00
parent e3f7b5e7c7
commit 848c952073

View File

@ -17,7 +17,7 @@ export default class AuthTokenController extends Controller {
public async getAuthTokens(req: Request, res: Response): Promise<void> { public async getAuthTokens(req: Request, res: Response): Promise<void> {
const allowedDomains = config.get<string[]>('allowed_url_domains'); const allowedDomains = config.get<string[]>('allowed_url_domains');
const user = req.as(RequireAuthMiddleware).getUser(); const user = req.as(RequireAuthMiddleware).getUser();
const authTokens = await AuthToken.paginateForUser(req, 2, user.getOrFail('id')); const authTokens = await AuthToken.paginateForUser(req, 25, user.getOrFail('id'));
res.render('auth-tokens', { res.render('auth-tokens', {
allowed_domains: allowedDomains, allowed_domains: allowedDomains,
default_domain: allowedDomains[config.get<number>('default_url_domain_for_files')], default_domain: allowedDomains[config.get<number>('default_url_domain_for_files')],