fix: user authentication interface
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Router } from 'express';
|
||||
import logger from "../logger";
|
||||
import { loadIntegrations, saveIntegrations } from '../workflow-management/integrations/gsheet';
|
||||
// import { loadIntegrations, saveIntegrations } from '../workflow-management/integrations/gsheet';
|
||||
import { requireSignIn } from '../middlewares/auth';
|
||||
|
||||
export const router = Router();
|
||||
@@ -12,11 +12,6 @@ router.post('/upload-credentials', requireSignIn, async (req, res) => {
|
||||
return res.status(400).json({ message: 'Credentials, Spreadsheet ID, and Range are required.' });
|
||||
}
|
||||
// *** TEMPORARILY WE STORE CREDENTIALS HERE ***
|
||||
let integrations = loadIntegrations(fileName);
|
||||
integrations = { fileName, spreadsheetId, range, credentials };
|
||||
saveIntegrations(fileName, integrations);
|
||||
logger.log('info', 'Service account credentials saved successfully.');
|
||||
return res.send(true);
|
||||
} catch (error: any) {
|
||||
logger.log('error', `Error saving credentials: ${error.message}`);
|
||||
return res.status(500).json({ message: 'Failed to save credentials.', error: error.message });
|
||||
|
||||
Reference in New Issue
Block a user