diff --git a/src/lib/api.js b/src/lib/api.js index c9a70b6..9cbf898 100644 --- a/src/lib/api.js +++ b/src/lib/api.js @@ -148,15 +148,15 @@ export async function getStreamingHealth(host) { * GET /api/v1/notifications * @param {string} host - The domain of the target server. * @param {string} token - The application token. - * @param {string} max_id - If provided, only shows notifications after this ID. + * @param {string} min_id - If provided, only shows notifications after this ID. * @param {string} limit - The maximum number of notifications to retrieve (default 40). * @param {string} types - A list of notification types to filter to. */ -export async function getNotifications(host, token, max_id, limit, types) { +export async function getNotifications(host, token, min_id, limit, types) { let url = `https://${host}/api/v1/notifications`; let params = new URLSearchParams(); - if (max_id) params.append("max_id", max_id); + if (min_id) params.append("min_id", min_id); if (limit) params.append("limit", limit); if (types) params.append("types", types.join(',')); const params_string = params.toString();