small refinment

This commit is contained in:
arc-alex
2023-12-13 17:31:33 +01:00
parent d763f3f6b9
commit 0024b02638
4 changed files with 62 additions and 48 deletions
@@ -508,13 +508,14 @@ export async function uploadGoogleSheetClientFile(req, res) {
/**
* @returns link to sheet auth url
* @method GET
*/
export async function sheetAuthUrl(req, res) {
const successful = await Sheet.openAuthServer();
if (successful === false) {
res.status(500).send('bad');
const authUrl = await Sheet.openAuthServer();
if (!authUrl) {
res.status(500).send('Unable to start auth server');
} else {
res.status(200).send(successful);
res.status(200).send(authUrl);
}
}