forked from shihaam/textpipe
add some more security: return sim specifc sms based on api key
This commit is contained in:
@@ -386,9 +386,8 @@
|
||||
async function loadStatus() {
|
||||
try {
|
||||
const r = await fetch('/api/status', { headers: { 'X-API-Key': apiKey } });
|
||||
const d = await r.json();
|
||||
const sim = d.sims && d.sims[0];
|
||||
document.getElementById('sim-info').textContent = sim
|
||||
const sim = await r.json();
|
||||
document.getElementById('sim-info').textContent = sim.slot !== undefined
|
||||
? `SIM ${sim.slot + 1} - ${sim.number || sim.carrier || 'Unknown'}`
|
||||
: 'No SIM';
|
||||
} catch (e) {}
|
||||
|
||||
Reference in New Issue
Block a user