@myk794/adly 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adly.js +7 -1
- package/package.json +1 -1
package/adly.js
CHANGED
|
@@ -131,7 +131,13 @@ function cmdConfig(args) {
|
|
|
131
131
|
async function cmdStatus() {
|
|
132
132
|
const { token } = loadConfig();
|
|
133
133
|
if (!token) return fail("önce: adly login <email>");
|
|
134
|
-
|
|
134
|
+
let me;
|
|
135
|
+
try {
|
|
136
|
+
me = await api("/api/developer/me", { token });
|
|
137
|
+
} catch {
|
|
138
|
+
return fail("backend'e ulaşılamadı: " + loadConfig().api + " (ağ/zaman aşımı — tekrar dene)");
|
|
139
|
+
}
|
|
140
|
+
if (!me || me.error) return fail("durum alınamadı: " + (me && me.error ? me.error : "bilinmiyor"));
|
|
135
141
|
console.log(`${sym().dev} ${me.email}`);
|
|
136
142
|
console.log(` Bakiye: ${me.balance_try} TRY`);
|
|
137
143
|
console.log(` Gösterim: ${me.impressions}`);
|