mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-10 05:14:27 +02:00
28 lines
610 B
PHP
28 lines
610 B
PHP
<?php
|
|
|
|
// Copyright (C) 2010-2024, the Friendica project
|
|
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
namespace Friendica\Module\Api\Mastodon\Notifications;
|
|
|
|
use Friendica\Core\System;
|
|
use Friendica\DI;
|
|
use Friendica\Module\BaseApi;
|
|
|
|
/**
|
|
* @see https://docs.joinmastodon.org/methods/notifications/
|
|
*/
|
|
class Clear extends BaseApi
|
|
{
|
|
protected function post(array $request = [])
|
|
{
|
|
$this->checkAllowedScope(self::SCOPE_WRITE);
|
|
$uid = self::getCurrentUserID();
|
|
|
|
DI::notification()->setAllDismissedForUser($uid);
|
|
|
|
$this->jsonExit([]);
|
|
}
|
|
}
|