<?php

require_once '../include/DatabaseConn.php';

$db = new DatabaseConn();
$link = $db->connect();

$lists = filter_input(INPUT_GET, "lists");

$lists = json_decode($lists);

if(count($lists) > 0) {
    foreach ($lists as $list) {
         $res = mysqli_query($link, "UPDATE notifications SET `seen` = 'true' WHERE `id`  = {$list->id}");
    }
   
}

$std = new stdClass();
$std->lists = [];

header("content-type: application/json");
echo (json_encode($std));
die();
