Fixed share page. Updated data tables to be responsive.
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
} from 'next-basics';
|
||||
import { getUserByUsername } from 'queries';
|
||||
import * as yup from 'yup';
|
||||
import { ROLES } from 'lib/constants';
|
||||
|
||||
const log = debug('umami:auth');
|
||||
|
||||
@@ -62,7 +63,7 @@ export default async (
|
||||
|
||||
return ok(res, {
|
||||
token,
|
||||
user: { id, username, role, createdAt },
|
||||
user: { id, username, role, createdAt, isAdmin: role === ROLES.admin },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import { pageInfo } from 'lib/schema';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { badRequest, hashPassword, methodNotAllowed, ok, unauthorized } from 'next-basics';
|
||||
import { createUser, getUserByUsername, getUsers } from 'queries';
|
||||
import * as yup from 'yup';
|
||||
|
||||
export interface UsersRequestQuery extends SearchFilter {}
|
||||
export interface UsersRequestBody {
|
||||
@@ -16,7 +17,6 @@ export interface UsersRequestBody {
|
||||
role: Role;
|
||||
}
|
||||
|
||||
import * as yup from 'yup';
|
||||
const schema = {
|
||||
GET: yup.object().shape({
|
||||
...pageInfo,
|
||||
|
||||
Reference in New Issue
Block a user