Fix more build errors
This commit is contained in:
parent
1bdc1e60db
commit
30ce47826f
61 changed files with 1161 additions and 541 deletions
|
|
@ -30,7 +30,7 @@ export interface Session {
|
|||
|
||||
// from https://github.com/nextauthjs/next-auth/blob/main/src/lib/errors.js
|
||||
class UnknownError extends Error {
|
||||
constructor(message) {
|
||||
constructor(message: any) {
|
||||
super(message);
|
||||
this.name = "UnknownError";
|
||||
this.message = message;
|
||||
|
|
@ -48,14 +48,14 @@ class UnknownError extends Error {
|
|||
}
|
||||
|
||||
class CreateUserError extends UnknownError {
|
||||
constructor(message) {
|
||||
constructor(message: any) {
|
||||
super(message);
|
||||
this.name = "CreateUserError";
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
const basicHeader = (secret) =>
|
||||
const basicHeader = (secret: any) =>
|
||||
"Basic " + Buffer.from(secret + ":", "utf8").toString("base64");
|
||||
|
||||
export const MetamigoAdapter = (config: IAppConfig): Adapter => {
|
||||
|
|
@ -155,7 +155,7 @@ export const MetamigoAdapter = (config: IAppConfig): Adapter => {
|
|||
await wreck.put("linkAccount", {
|
||||
payload,
|
||||
});
|
||||
} catch (error) {
|
||||
} catch {
|
||||
throw new Error("LINK_ACCOUNT_ERROR");
|
||||
}
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ export const MetamigoAdapter = (config: IAppConfig): Adapter => {
|
|||
}
|
||||
}
|
||||
|
||||
return Promise.resolve({
|
||||
return {
|
||||
createUser,
|
||||
getUser,
|
||||
getUserByEmail,
|
||||
|
|
@ -222,7 +222,7 @@ export const MetamigoAdapter = (config: IAppConfig): Adapter => {
|
|||
updateSession,
|
||||
deleteSession,
|
||||
// @ts-expect-error: Type error
|
||||
} as AdapterInstance<Profile, User, Session, unknown>);
|
||||
} as AdapterInstance<Profile, User, Session, unknown>;
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue