-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
0 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
//! # Endpoints | ||
//! | ||
//! - [Get all settings](#get-all-settings) | ||
//! - [Update all settings](#update-all-settings) | ||
//! - [Get site name](#get-site-name) | ||
//! - [Get public settings](#get-public-settings) | ||
//! | ||
|
@@ -102,34 +101,6 @@ | |
//! Refer to the [`TorrustIndex`](crate::config::Settings) | ||
//! struct for more information about the response attributes. | ||
//! | ||
//! # Update all settings | ||
//! | ||
//! **NOTICE**: This endpoint to update the settings does not work when you use | ||
//! environment variables to configure the application. You need to use a | ||
//! configuration file instead. Because settings are persisted in that file. | ||
//! Refer to the issue [#144](https://github.com/torrust/torrust-index/issues/144) | ||
//! for more information. | ||
//! | ||
//! `POST /v1/settings` | ||
//! | ||
//! **Example request** | ||
//! | ||
//! ```bash | ||
//! curl \ | ||
//! --header "Content-Type: application/json" \ | ||
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \ | ||
//! --request POST \ | ||
//! --data '{"website":{"name":"Torrust"},"tracker":{"url":"udp://localhost:6969","mode":"public","api_url":"http://localhost:1212/","token":"MyAccessToken","token_valid_seconds":7257600},"net":{"port":3001,"base_url":null},"auth":{"min_password_length":6,"max_password_length":64,"secret_key":"MaxVerstappenWC2021"},"database":{"connect_url":"sqlite://./storage/database/data.db?mode=rwc"},"mail":{"from":"[email protected]","reply_to":"[email protected]","username":"","password":"","server":"","port":25},"image_cache":{"max_request_timeout_ms":1000,"capacity":128000000,"entry_size_limit":4000000,"user_quota_period_seconds":3600,"user_quota_bytes":64000000},"api":{"default_torrent_page_size":10,"max_torrent_page_size":30},"tracker_statistics_importer":{"torrent_info_update_interval":3600}}' \ | ||
//! "http://127.0.0.1:3001/v1/settings" | ||
//! ``` | ||
//! | ||
//! The response contains the settings that were updated. | ||
//! | ||
//! **Resource** | ||
//! | ||
//! Refer to the [`TorrustIndex`](crate::config::Settings) | ||
//! struct for more information about the response attributes. | ||
//! | ||
//! # Get site name | ||
//! | ||
//! `GET /v1/settings/name` | ||
|