Implemented basic db-based archive functionality, converted old archive functionality to new system

This commit is contained in:
Tzahi12345
2023-01-23 23:17:58 -05:00
parent 54208ce6ce
commit 840e12db71
9 changed files with 120 additions and 115 deletions

View File

@@ -2,8 +2,9 @@
/* tslint:disable */
/* eslint-disable */
import type { FileType } from './FileType';
export type DownloadArchiveRequest = {
sub: {
archive_dir: string;
};
type?: FileType;
sub_id?: string;
};

View File

@@ -434,8 +434,8 @@ export class PostsService implements CanActivate {
return this.http.post<SuccessObject>(this.path + 'uploadCookies', fileFormData, this.httpOptions);
}
downloadArchive(sub) {
const body: DownloadArchiveRequest = {sub: sub};
downloadArchive(type: FileType, sub_id: string) {
const body: DownloadArchiveRequest = {type: type, sub_id: sub_id};
return this.http.post(this.path + 'downloadArchive', body, {responseType: 'blob', params: this.httpOptions.params});
}