format:format and fix code

This commit is contained in:
jiangrui
2025-02-24 15:22:43 +08:00
parent c784b562c4
commit f5106e782a
46 changed files with 2055 additions and 1172 deletions

View File

@@ -12,7 +12,7 @@ export class ImageControll {
this.initializeAxiosInstance();
}
private async initializeAxiosInstance(isUpdate = false) {
private async initializeAxiosInstance(isUpdate = false): Promise<void> {
let settings = null;
if (isUpdate) {
settings = await GlobalSetting.findOne();
@@ -35,7 +35,7 @@ export class ImageControll {
withCredentials: true,
});
}
async getImages(req: Request, res: Response, url: string) {
async getImages(req: Request, res: Response, url: string): Promise<void> {
try {
if (!this.isUpdate) await this.initializeAxiosInstance(true);
const response = await this.axiosInstance?.get(url, { responseType: "stream" });
@@ -50,7 +50,7 @@ export class ImageControll {
const iamgesInstance = new ImageControll();
export const imageControll = {
getImages: async (req: Request, res: Response) => {
getImages: async (req: Request, res: Response): Promise<void> => {
const url = req.query.url as string;
iamgesInstance.getImages(req, res, url);
},