Skip to content

Commit

Permalink
Integration testing completed; should be ready to merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
dmf444 committed Sep 14, 2024
1 parent 197a058 commit 8308bdb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/FileUploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class FileUploader {
container: fileMetadata.container,
description: this.completeJson(this.file.fileMetadata.description, this.file.fileMetadata.descriptionVersion),
desc_version: fileMetadata.descriptionVersion,
page_count: !fileMetadata.descriptionVersion.startsWith("1") ? fileMetadata.pageCount : undefined,
page_count: !fileMetadata.descriptionVersion.startsWith("1") ? (fileMetadata.pageCount ?? "null") : undefined,
date: fileMetadata.date ?? "",
restriction: fileMetadata.restrictions,
tags: fileMetadata.tags,
Expand Down
2 changes: 1 addition & 1 deletion src/main/api/FormData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function convertFormData(
if (value == undefined) return;

if(value.hasOwnProperty("file_title") && value.hasOwnProperty("file_data")) {
formData.set(formKey, value.data, value.title);
formData.set(formKey, value.file_data, value.file_title);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/api/RemoteServerApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type UploadType = {
container: number,
description: string
desc_version: string,
page_count?: number,
page_count?: number | "null",
date: string,
restriction: number,
tags: string[],
Expand Down
4 changes: 3 additions & 1 deletion src/main/group/GroupManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {GroupUploader} from "@main/group/controller/GroupUploader";
import {IDownloader} from "@main/downloader/interfaces/IDownloader";
import RemoteServerApi from "@main/api/RemoteServerApi";
import {UploadResultStatusType} from "@main/database/LocalDatabase";
import {sendSuccess} from "@main/NotificationBundle";


type GroupImportType = {
Expand Down Expand Up @@ -54,6 +55,7 @@ export class GroupManager {
}
//Save to database
getFileDatabase().addGroup(group);
sendSuccess("Group Import Completed", "Successfully imported group folder.");
}
}

Expand All @@ -74,7 +76,7 @@ export class GroupManager {
public static deleteGroup(group: GroupModel, removeFolder: boolean = false) {
log.info(`Deleting Group: ${group.getName()} with id: ${group.id}. Folder removal: ${removeFolder}`);
if(removeFolder) {
jetpack.remove(group.getRootFolder())
jetpack.remove(group.getRootFolder());
}
getFileDatabase().removeGroup(group);
}
Expand Down

0 comments on commit 8308bdb

Please sign in to comment.