Feat/um 305 unique session ch (#2065)

* Add session_data / session redis to CH.

* Add mysql migration.
This commit is contained in:
Brian Cao 2023-05-31 21:46:49 -07:00 committed by GitHub
parent 1038a54fe4
commit b484286523
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 405 additions and 300 deletions

View file

@ -3,7 +3,7 @@ import { getRandomChars } from 'next-basics';
import cache from 'lib/cache';
import { ROLES } from 'lib/constants';
import prisma from 'lib/prisma';
import { Website, User, Roles } from 'lib/types';
import { Website, User, Role } from 'lib/types';
export async function getUser(
where: Prisma.UserWhereInput | Prisma.UserWhereUniqueInput,
@ -91,7 +91,7 @@ export async function createUser(data: {
id: string;
username: string;
password: string;
role: Roles;
role: Role;
}): Promise<{
id: string;
username: string;