diff --git a/backend/controllers/googleFile.ts b/backend/controllers/googleFile.ts index aa18edc..c9fdfcf 100644 --- a/backend/controllers/googleFile.ts +++ b/backend/controllers/googleFile.ts @@ -1,6 +1,7 @@ import { Request, Response } from "express"; import {UserInterface} from "../models/user"; import GoogleFileService from "../services/GoogleFileService"; +import { googleQueryType } from "../utils/createQueryGoogle"; const googleFileService = new GoogleFileService(); @@ -42,7 +43,7 @@ class GoogleFileController { try { const user = req.user; - const query = req.query; + const query = req.query as unknown as googleQueryType; const googleFiles = await googleFileService.getList(user, query); @@ -64,7 +65,7 @@ class GoogleFileController { try { const user = req.user; - const query = req.query; + const query = req.query as unknown as googleQueryType; const mongoGoogleFiles = await googleFileService.getMongoGoogleList(user, query); diff --git a/backend/controllers/googleFolder.ts b/backend/controllers/googleFolder.ts index 1f5d6d7..9d48240 100644 --- a/backend/controllers/googleFolder.ts +++ b/backend/controllers/googleFolder.ts @@ -1,6 +1,7 @@ import { Request, Response } from "express"; import {UserInterface} from "../models/user"; import GoogleFolderService from "../services/GoogleFolderService"; +import { googleQueryType } from "../utils/createQueryGoogle"; const googleFolderService = new GoogleFolderService(); @@ -41,7 +42,7 @@ class GoogleFolderController { try { const user = req.user; - const query = req.query; + const query = req.query as unknown as googleQueryType; const folderList = await googleFolderService.getList(user, query); @@ -152,10 +153,10 @@ class GoogleFolderController { try { const user = req.user; - const fileID = req.body.id; + const folderID = req.body.id; const title = req.body.title - await googleFolderService.renameFolder(user, fileID, title); + await googleFolderService.renameFolder(user, folderID, title); res.send(); @@ -175,9 +176,9 @@ class GoogleFolderController { try { const user = req.user; - const fileID = req.body.id; + const folderID = req.body.id; - await googleFolderService.removeFolder(user, fileID) + await googleFolderService.removeFolder(user, folderID) res.send(); @@ -219,10 +220,10 @@ class GoogleFolderController { try { const user = req.user; - const fileID = req.body.id; + const folderID = req.body.id; const parentID = req.body.parent; - await googleFolderService.moveFolder(user, fileID, parentID); + await googleFolderService.moveFolder(user, folderID, parentID); res.send();