Merge branch 'main' into CEC-5443
This commit is contained in:
@@ -83,10 +83,10 @@ export const ManifestsProvider = ({ children }) => {
|
||||
const migrateManifest = async (package_id, token) => {
|
||||
let result;
|
||||
|
||||
try{
|
||||
try {
|
||||
setBusy(true)
|
||||
result = await api.migrateManifest(package_id, token)
|
||||
if(result.error)
|
||||
if (result.error)
|
||||
throw new Error(`failed to migrate manifest. ${result.message}`);
|
||||
} finally {
|
||||
setBusy(false)
|
||||
@@ -116,7 +116,7 @@ export const ManifestsProvider = ({ children }) => {
|
||||
const validateManifestUpdate = (data) => {
|
||||
if (data == null) throw new Error("No manifest data");
|
||||
|
||||
if (data.name == null || data.name.length>255) throw new Error("Invalid manifest name");
|
||||
if (data.name == null || data.name.length > 255) throw new Error("Invalid manifest name");
|
||||
|
||||
if (data.type == null || !["forced", "standard"].includes(data.type)) {
|
||||
throw new Error("Invalid manifest type");
|
||||
|
||||
Reference in New Issue
Block a user