Feat/um 305 unique session ch (#2065)
* Add session_data / session redis to CH. * Add mysql migration.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { NextApiRequestQueryBody, Roles, User } from 'lib/types';
|
||||
import { NextApiRequestQueryBody, Role, User } from 'lib/types';
|
||||
import { canDeleteUser, canUpdateUser, canViewUser } from 'lib/auth';
|
||||
import { useAuth } from 'lib/middleware';
|
||||
import { NextApiResponse } from 'next';
|
||||
@@ -12,7 +12,7 @@ export interface UserRequestQuery {
|
||||
export interface UserRequestBody {
|
||||
username: string;
|
||||
password: string;
|
||||
role: Roles;
|
||||
role: Role;
|
||||
}
|
||||
|
||||
export default async (
|
||||
|
||||
@@ -2,7 +2,7 @@ import { canCreateUser, canViewUsers } from 'lib/auth';
|
||||
import { ROLES } from 'lib/constants';
|
||||
import { uuid } from 'lib/crypto';
|
||||
import { useAuth } from 'lib/middleware';
|
||||
import { NextApiRequestQueryBody, Roles, User } from 'lib/types';
|
||||
import { NextApiRequestQueryBody, Role, User } from 'lib/types';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { badRequest, hashPassword, methodNotAllowed, ok, unauthorized } from 'next-basics';
|
||||
import { createUser, getUser, getUsers } from 'queries';
|
||||
@@ -11,7 +11,7 @@ export interface UsersRequestBody {
|
||||
username: string;
|
||||
password: string;
|
||||
id: string;
|
||||
role?: Roles;
|
||||
role?: Role;
|
||||
}
|
||||
|
||||
export default async (
|
||||
|
||||
Reference in New Issue
Block a user