(url, status)
| 40 | |
| 41 | // Function to update the status of a mention |
| 42 | async function updateStatusForMention(url, status) { |
| 43 | try { |
| 44 | const data = loadMentionData(); |
| 45 | |
| 46 | // Check if the URL exists |
| 47 | if (data[url]) { |
| 48 | data[url].status = status; // Update the status |
| 49 | saveMentionData(data); |
| 50 | console.log(`Status for URL ${url} has been updated to: ${status}`); |
| 51 | } else { |
| 52 | console.log(`URL ${url} not found in the mention list.`); |
| 53 | } |
| 54 | } catch (error) { |
| 55 | console.error("Error while updating the status for the mention:", error); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | // Function to retrieve all mentions |
| 60 | async function getAllMentions() { |
nothing calls this directly
no test coverage detected