Validate task name in API
This commit is contained in:
1 parent
5b17d1b2ca
commit
111cb106d0
1 file changed
+9
@@ -296,6 +296,15 @@ function sanitizeTask(task): void {
|
||||
)
|
||||
throw new Error("Invalid 'provisions' property");
|
||||
break;
|
||||
|
||||
case "reboot":
|
||||
break;
|
||||
|
||||
case "factoryReset":
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Error("Invalid task name");
|
||||
}
|
||||
|
||||
return task;
|
||||
|
||||
Reference in new issue
Block a user