chore: tech debt clearing - getServerSession has a dead arg: res (#19053)
* remove res from arg list in getServerSession * remove res from all usages of getServerSession
This commit is contained in:
1 parent
15d6839985
commit
f0dc3bba17
29 files changed
+42
-45
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { LRUCache } from "lru-cache";
|
||||
import type { GetServerSidePropsContext, NextApiRequest, NextApiResponse } from "next";
|
||||
import type { GetServerSidePropsContext, NextApiRequest } from "next";
|
||||
import type { AuthOptions, Session } from "next-auth";
|
||||
import { getToken } from "next-auth/jwt";
|
||||
|
||||
@@ -30,7 +30,6 @@ const CACHE = new LRUCache<string, Session>({ max: 1000 });
|
||||
*/
|
||||
export async function getServerSession(options: {
|
||||
req: NextApiRequest | GetServerSidePropsContext["req"];
|
||||
res?: NextApiResponse | GetServerSidePropsContext["res"];
|
||||
authOptions?: AuthOptions;
|
||||
}) {
|
||||
const { req, authOptions: { secret } = {} } = options;
|
||||
|
||||
Reference in new issue
Block a user