mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 10:03:21 -04:00
add comments
This commit is contained in:
@@ -192,9 +192,9 @@
|
|||||||
// Choose the correct JSON string based on the type ('service' or 'user'),
|
// Choose the correct JSON string based on the type ('service' or 'user'),
|
||||||
// replace single quotes with double quotes to ensure valid JSON format,
|
// replace single quotes with double quotes to ensure valid JSON format,
|
||||||
// then parse the JSON string into a JavaScript object.
|
// then parse the JSON string into a JavaScript object.
|
||||||
var statJson = type === 'service' ? daily_stats : daily_stats_by_user;
|
var statsJson = type === 'service' ? daily_stats : daily_stats_by_user;
|
||||||
statJson = statJson.replace(/'/g, '"');
|
statsJson = statsJson.replace(/'/g, '"');
|
||||||
data = JSON.parse(statJson);
|
data = JSON.parse(statsJson);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error parsing JSON data:', error);
|
console.error('Error parsing JSON data:', error);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user