fast-insta-api
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -79,6 +79,10 @@ const crypto = require('crypto'); | ||
if (fs.existsSync('./utils/cookies.json')) { | ||
const existingCookies = await fs.readFile('./utils/cookies.json','utf-8',()=>{}); | ||
const existingCookiesJson = JSON.parse(existingCookies); | ||
this.headers = existingCookiesJson; | ||
return existingCookiesJson; | ||
fs.readFile('./utils/cookies.json','utf-8',(err,existingCookies)=>{ | ||
if (err) { | ||
throw new Error('cookie format is wrong / expired, please try logging in again using function login().'); | ||
} | ||
const existingCookiesJson = JSON.parse(existingCookies); | ||
this.headers = existingCookiesJson; | ||
return existingCookiesJson; | ||
}); | ||
}else{ | ||
@@ -85,0 +89,0 @@ return null; |
{ | ||
"name": "fast-insta-api", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
82468
825