2021-05-15 12:13:03 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright Copyright (C) 2010-2021, the Friendica project
|
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Friendica\Module\Api\Mastodon\Accounts;
|
|
|
|
|
2021-07-30 06:19:02 +00:00
|
|
|
use Friendica\App\Router;
|
2021-05-21 17:36:51 +00:00
|
|
|
use Friendica\Core\Logger;
|
2021-05-15 12:13:03 +00:00
|
|
|
use Friendica\Module\BaseApi;
|
2021-05-21 17:36:51 +00:00
|
|
|
use Friendica\Util\HTTPInputData;
|
2021-05-15 12:13:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @see https://docs.joinmastodon.org/methods/accounts/
|
|
|
|
*/
|
|
|
|
class UpdateCredentials extends BaseApi
|
|
|
|
{
|
2021-11-20 15:38:03 +01:00
|
|
|
protected function patch()
|
2021-05-15 12:13:03 +00:00
|
|
|
{
|
2021-06-08 12:00:22 +00:00
|
|
|
self::checkAllowedScope(self::SCOPE_WRITE);
|
2021-05-15 12:13:03 +00:00
|
|
|
$uid = self::getCurrentUserID();
|
|
|
|
|
2021-05-21 17:36:51 +00:00
|
|
|
$data = HTTPInputData::process();
|
|
|
|
|
|
|
|
Logger::info('Patch data', ['data' => $data]);
|
2021-05-15 12:13:03 +00:00
|
|
|
|
2021-11-21 21:52:36 +01:00
|
|
|
$this->response->unsupported(Router::PATCH);
|
2021-05-15 12:13:03 +00:00
|
|
|
}
|
|
|
|
}
|