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.
|
||||
* @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()}`
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ export function prefixRoleID(name: string) {
|
|||
* 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.
|
||||
*/
|
||||
export const generateDevInfoID = (userId: any) => {
|
||||
export const generateDevInfoID = (userId: string) => {
|
||||
return `${DocumentType.DEV_INFO}${SEPARATOR}${userId}`
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ export const checkBuilderEndpoint = async ({
|
|||
config: TestConfiguration
|
||||
method: string
|
||||
url: string
|
||||
body: any
|
||||
body?: any
|
||||
}) => {
|
||||
const headers = await config.login({
|
||||
userId: "us_fail",
|
||||
|
|
|
@ -539,7 +539,7 @@ export default class TestConfiguration {
|
|||
return this.createApp(appName)
|
||||
}
|
||||
|
||||
doInTenant(task: any) {
|
||||
doInTenant<T>(task: () => T) {
|
||||
return context.doInTenant(this.getTenantId(), task)
|
||||
}
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ class TestConfiguration {
|
|||
|
||||
const db = context.getGlobalDB()
|
||||
|
||||
const id = dbCore.generateDevInfoID(this.user!._id)
|
||||
const id = dbCore.generateDevInfoID(this.user!._id!)
|
||||
// TODO: dry
|
||||
this.apiKey = encryption.encrypt(
|
||||
`${this.tenantId}${dbCore.SEPARATOR}${utils.newid()}`
|
||||
|
|
Loading…
Reference in New Issue