Type breaking changes as any
This commit is contained in:
parent
c4c62e5c6f
commit
1072292b9f
|
@ -159,7 +159,7 @@ export async function updateUserOAuth(userId: string, oAuthConfig: any) {
|
|||
|
||||
try {
|
||||
const db = getGlobalDB()
|
||||
const dbUser = await db.get(userId)
|
||||
const dbUser = await db.get<any>(userId)
|
||||
|
||||
//Do not overwrite the refresh token if a valid one is not provided.
|
||||
if (typeof details.refreshToken !== "string") {
|
||||
|
|
|
@ -12,7 +12,7 @@ const EXPIRY_SECONDS = 3600
|
|||
*/
|
||||
async function populateFromDB(userId: string, tenantId: string) {
|
||||
const db = tenancy.getTenantDB(tenantId)
|
||||
const user = await db.get(userId)
|
||||
const user = await db.get<any>(userId)
|
||||
user.budibaseAccess = true
|
||||
if (!env.SELF_HOSTED && !env.DISABLE_ACCOUNT_PORTAL) {
|
||||
const account = await accounts.getAccount(user.email)
|
||||
|
|
|
@ -5,7 +5,7 @@ export async function createUserIndex() {
|
|||
const db = getGlobalDB()
|
||||
let designDoc
|
||||
try {
|
||||
designDoc = await db.get("_design/database")
|
||||
designDoc = await db.get<any>("_design/database")
|
||||
} catch (err: any) {
|
||||
if (err.status === 404) {
|
||||
designDoc = { _id: "_design/database" }
|
||||
|
|
|
@ -67,9 +67,9 @@ export const bulkUpdateGlobalUsers = async (users: User[]) => {
|
|||
|
||||
export async function getById(id: string, opts?: GetOpts): Promise<User> {
|
||||
const db = context.getGlobalDB()
|
||||
let user = await db.get(id)
|
||||
let user = await db.get<User>(id)
|
||||
if (opts?.cleanup) {
|
||||
user = removeUserPassword(user)
|
||||
user = removeUserPassword(user) as User
|
||||
}
|
||||
return user
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue