accept appName in place of appId
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled

This commit is contained in:
ProgrammerIn-wonderland
2025-08-07 16:15:20 -04:00
committed by Neal Shah
parent 82c1f64b37
commit 0deaaf4736
+6 -1
View File
@@ -7,7 +7,7 @@ export class WorkersHandler {
this.authToken = authToken;
}
async create(workerName, filePath, appId) {
async create(workerName, filePath, appName) {
if (!puter.authToken && puter.env === 'web') {
try {
await puter.ui.authenticateWithPuter();
@@ -17,6 +17,11 @@ export class WorkersHandler {
}
}
let appId;
if (typeof (appName)=== "string") {
appId = ((await puter.apps.list()).find(el => el.name === appName)).uid;
}
workerName = workerName.toLocaleLowerCase(); // just incase
let currentWorkers = await puter.kv.get("user-workers");
if (!currentWorkers) {