Remove Act, AutoUpdater, and Book IPC modules alongside associated database logic.
This commit is contained in:
@@ -3,7 +3,7 @@ import {X} from 'lucide-react';
|
||||
import IconButton from "@/components/ui/IconButton";
|
||||
import React, {ChangeEvent, forwardRef, useContext, useImperativeHandle, useState} from "react";
|
||||
import {apiDelete, apiPost} from "@/lib/api/client";
|
||||
import axios, {AxiosResponse} from "axios";
|
||||
import {fetch} from "@tauri-apps/plugin-http";
|
||||
import {AlertContext, AlertContextProps} from "@/context/AlertContext";
|
||||
import {BookContext, BookContextProps} from "@/context/BookContext";
|
||||
import {SessionContext, SessionContextProps} from "@/context/SessionContext";
|
||||
@@ -56,22 +56,17 @@ function BasicInformationSetting(_props: object, ref: React.ForwardedRef<Setting
|
||||
formData.append('picture', file);
|
||||
|
||||
try {
|
||||
const query: AxiosResponse<ArrayBuffer> = await axios({
|
||||
method: "POST",
|
||||
url: configs.apiUrl + `book/cover?bookid=${bookId}`,
|
||||
headers: {
|
||||
'Authorization': `Bearer ${userToken}`,
|
||||
},
|
||||
params: {
|
||||
lang: lang,
|
||||
plateforme: 'web',
|
||||
},
|
||||
data: formData,
|
||||
responseType: 'arraybuffer'
|
||||
});
|
||||
|
||||
const contentType: string = query.headers['content-type'] || 'image/jpeg';
|
||||
const blob: Blob = new Blob([query.data], {type: contentType});
|
||||
const query: Response = await fetch(
|
||||
configs.apiUrl + `book/cover?bookid=${bookId}&lang=${lang}&plateforme=desktop`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {'Authorization': `Bearer ${userToken}`},
|
||||
body: formData,
|
||||
}
|
||||
);
|
||||
|
||||
const contentType: string = query.headers.get('content-type') || 'image/jpeg';
|
||||
const blob: Blob = new Blob([await query.arrayBuffer()], {type: contentType});
|
||||
const reader: FileReader = new FileReader();
|
||||
|
||||
reader.onloadend = function (): void {
|
||||
|
||||
Reference in New Issue
Block a user