This commit is contained in:
Cedric Hoelzl 2020-07-02 14:16:45 +02:00
parent 9e54521a7d
commit 7b15a686b5
2 changed files with 4 additions and 4 deletions

View File

@ -138,7 +138,7 @@ module.exports = function(){
return get_tracking(ids).then(res=>{
var text = "*Tracking*\n\n";
for(var rr of res){
text+=`*[${rr.id}](${tracking.getTrackingUrl(rr.id)})*\n_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_\n${rr.status}\n\n`;
text+=`[*${rr.id}*](${tracking.getTrackingUrl(rr.id)})\n_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_\n${rr.status}\n\n`;
}
return event.reply( text, {"reply_markup":Markup.inlineKeyboard(kb),"parse_mode":"Markdown"});
});
@ -172,7 +172,7 @@ module.exports = function(){
return get_tracking(res).then(res=>{
var text = `*Tracking* (Updated: ${new Date().toLocaleString()})\n\n`;
for(var rr of res){
text+=`*[${rr.id}](${tracking.getTrackingUrl(rr.id)})*\n_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_\n${rr.status}\n\n`;
text+=`[*${rr.id}*](${tracking.getTrackingUrl(rr.id)})\n_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_\n${rr.status}\n\n`;
}
return event.editMessageText( text, {"reply_markup":Markup.inlineKeyboard(kb),"parse_mode":"Markdown"});
});

View File

@ -79,11 +79,11 @@ async function get_tracking(trck_ids, guid){
.then(res => res.json());
}
get_tracking(['993711592316210394'],'').then(res=>{
get_tracking(['99'],'').then(res=>{
console.log(res.dat);
console.log(res.dat[0].track.zex);
console.log(res.dat[0].track.z0);
console.log(res.dat[0].track.z1);
console.log(tracking.getTrackingUrl('993711592316210394'));
console.log(tracking.getTrackingUrl('99'));
});