More typing fixes.
This commit is contained in:
parent
7d757cf853
commit
237634386c
|
@ -74,7 +74,7 @@ export function getGlobalIDFromUserMetadataID(id: string) {
|
||||||
* Generates a template ID.
|
* Generates a template ID.
|
||||||
* @param ownerId The owner/user of the template, this could be global or a workspace level.
|
* @param ownerId The owner/user of the template, this could be global or a workspace level.
|
||||||
*/
|
*/
|
||||||
export function generateTemplateID(ownerId: any) {
|
export function generateTemplateID(ownerId: string) {
|
||||||
return `${DocumentType.TEMPLATE}${SEPARATOR}${ownerId}${SEPARATOR}${newid()}`
|
return `${DocumentType.TEMPLATE}${SEPARATOR}${ownerId}${SEPARATOR}${newid()}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ export function prefixRoleID(name: string) {
|
||||||
* Generates a new dev info document ID - this is scoped to a user.
|
* Generates a new dev info document ID - this is scoped to a user.
|
||||||
* @returns The new dev info ID which info for dev (like api key) can be stored under.
|
* @returns The new dev info ID which info for dev (like api key) can be stored under.
|
||||||
*/
|
*/
|
||||||
export const generateDevInfoID = (userId: any) => {
|
export const generateDevInfoID = (userId: string) => {
|
||||||
return `${DocumentType.DEV_INFO}${SEPARATOR}${userId}`
|
return `${DocumentType.DEV_INFO}${SEPARATOR}${userId}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ export const checkBuilderEndpoint = async ({
|
||||||
config: TestConfiguration
|
config: TestConfiguration
|
||||||
method: string
|
method: string
|
||||||
url: string
|
url: string
|
||||||
body: any
|
body?: any
|
||||||
}) => {
|
}) => {
|
||||||
const headers = await config.login({
|
const headers = await config.login({
|
||||||
userId: "us_fail",
|
userId: "us_fail",
|
||||||
|
|
|
@ -539,7 +539,7 @@ export default class TestConfiguration {
|
||||||
return this.createApp(appName)
|
return this.createApp(appName)
|
||||||
}
|
}
|
||||||
|
|
||||||
doInTenant(task: any) {
|
doInTenant<T>(task: () => T) {
|
||||||
return context.doInTenant(this.getTenantId(), task)
|
return context.doInTenant(this.getTenantId(), task)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,7 @@ class TestConfiguration {
|
||||||
|
|
||||||
const db = context.getGlobalDB()
|
const db = context.getGlobalDB()
|
||||||
|
|
||||||
const id = dbCore.generateDevInfoID(this.user!._id)
|
const id = dbCore.generateDevInfoID(this.user!._id!)
|
||||||
// TODO: dry
|
// TODO: dry
|
||||||
this.apiKey = encryption.encrypt(
|
this.apiKey = encryption.encrypt(
|
||||||
`${this.tenantId}${dbCore.SEPARATOR}${utils.newid()}`
|
`${this.tenantId}${dbCore.SEPARATOR}${utils.newid()}`
|
||||||
|
|
Loading…
Reference in New Issue