fixed notifications only getting older notifs instead of newer ones

This commit is contained in:
ari melody 2024-07-05 15:49:20 +01:00
parent 048d158209
commit 08cd43bd7d
Signed by: ari
GPG key ID: CF99829C92678188

View file

@ -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();