mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-07-17 18:23:20 -05:00
fix: solve problems with import script
This commit is contained in:
parent
2e492354e6
commit
4223d21987
|
|
@ -50,7 +50,7 @@ export async function uploadFileIfChanged(ops: UploadFileOptions): Promise<void>
|
|||
name: ops.fileXml.Filename._text,
|
||||
type: ops.fileXml.Type._text,
|
||||
notifyLed: ops.fileXml.Notify.LED._text === 'true',
|
||||
notifyOnNew: ops.fileXml.Notify.New._text.split(','),
|
||||
notifyOnNew: ops.fileXml.Notify.New._text?.split(',') ?? [],
|
||||
data: fileContents,
|
||||
supportedLanguages: [],
|
||||
supportedCountries: []
|
||||
|
|
@ -93,7 +93,11 @@ export async function processTasksheet(ctx: CliContext, taskFiles: string[], fil
|
|||
});
|
||||
console.log(`${filename}: Updated title ID and status`);
|
||||
|
||||
for (const file of xmlContents.TaskSheet.Files?.File ?? []) {
|
||||
let xmlFiles = xmlContents.TaskSheet.Files?.File ?? [];
|
||||
if (!Array.isArray(xmlFiles)) {
|
||||
xmlFiles = [xmlFiles];
|
||||
}
|
||||
for (const file of xmlFiles) {
|
||||
await uploadFileIfChanged({
|
||||
bossAppId: bossAppId,
|
||||
ctx: ctx,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user