mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 20:59:05 +00:00
Implement multi tenancy
This commit is contained in:
10
www/app/[domain]/api/current-user.ts
Normal file
10
www/app/[domain]/api/current-user.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { NextApiRequest } from "next";
|
||||
import { fief, getFiefAuth } from "../../lib/fief";
|
||||
// type FiefNextApiHandler<T> = (req: NextApiRequest & AuthenticateRequestResult, res: NextApiResponse<T>) => unknown | Promise<unknown>;
|
||||
|
||||
export default (req: any, res) => {
|
||||
const domain = req.url;
|
||||
console.log("user", req.url, getFiefAuth("localhost").currentUser());
|
||||
return getFiefAuth("localhost").currentUser()(req, res);
|
||||
};
|
||||
// export default fief.currentUser()
|
||||
Reference in New Issue
Block a user