1
0
Fork 0
mirror of synced 2024-10-02 10:08:09 +13:00

More typing fixes.

This commit is contained in:
Sam Rose 2024-02-28 12:19:08 +00:00
parent 7d757cf853
commit 237634386c
No known key found for this signature in database
4 changed files with 5 additions and 5 deletions

View file

@ -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}`
}

View file

@ -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",

View file

@ -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)
}

View file

@ -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()}`