updates
This commit is contained in:
parent
b65aa390be
commit
5aab7d1eb6
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "datasquirel",
|
"name": "datasquirel",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "Cloud-based SQL data management tool",
|
"description": "Cloud-based SQL data management tool",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* @property {number} social_login - 0 or 1 => is this user a social user(1) or not(0)
|
* @property {number} social_login - 0 or 1 => is this user a social user(1) or not(0)
|
||||||
* @property {string} csrf_k - CSRF key
|
* @property {string} csrf_k - CSRF key
|
||||||
* @property {boolean} logged_in_status - Is user logged in or not
|
* @property {boolean} logged_in_status - Is user logged in or not
|
||||||
|
* @property {boolean} [date] - Time of session creation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = { DATASQUIREL_LoggedInUser };
|
module.exports = { DATASQUIREL_LoggedInUser };
|
||||||
|
@ -152,7 +152,17 @@ async function githubAuth({ key, code, email, database, clientId, clientSecret,
|
|||||||
});
|
});
|
||||||
|
|
||||||
response.on("end", function () {
|
response.on("end", function () {
|
||||||
resolve(JSON.parse(str));
|
try {
|
||||||
|
resolve(JSON.parse(str));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error.message);
|
||||||
|
|
||||||
|
resolve({
|
||||||
|
success: false,
|
||||||
|
user: null,
|
||||||
|
msg: "Something went wrong",
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
response.on("error", (err) => {
|
response.on("error", (err) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user