Skip to content

Commit

Permalink
feat!: change default API port to 3001
Browse files Browse the repository at this point in the history
To avoid conflict with the frontend default port for nuxt.
  • Loading branch information
josecelano committed Jun 28, 2023
1 parent 31d63e3 commit ba8b2c2
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 49 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM chef as development
WORKDIR /app
ARG UID=1000
ARG RUN_AS_USER=appuser
ARG IDX_BACK_API_PORT=3000
ARG IDX_BACK_API_PORT=3001
# Add the app user for development
ENV USER=appuser
ENV UID=$UID
Expand Down Expand Up @@ -57,7 +57,7 @@ RUN strip /app/target/x86_64-unknown-linux-musl/release/main
FROM alpine:latest
WORKDIR /app
ARG RUN_AS_USER=appuser
ARG IDX_BACK_API_PORT=3000
ARG IDX_BACK_API_PORT=3001
RUN apk --no-cache add ca-certificates
ENV TZ=Etc/UTC
ENV RUN_AS_USER=$RUN_AS_USER
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ git clone https://github.com/torrust/torrust-index-backend.git \

And then run `cargo run` twice. The first time to generate the `config.toml` file and the second time to run the backend with the default configuration.

After running the tracker the API will be available at <http://localhost:3000>.
After running the tracker the API will be available at <http://localhost:3001>.

## Documentation

Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
networks:
- server_side
ports:
- 3000:3000
- 3001:3001
# todo: implement healthcheck
#healthcheck:
# test:
Expand Down
2 changes: 1 addition & 1 deletion config-idx-back.local.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ token = "MyAccessToken"
token_valid_seconds = 7257600

[net]
port = 3000
port = 3001

[auth]
email_on_signup = "Optional"
Expand Down
2 changes: 1 addition & 1 deletion config.local.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ token = "MyAccessToken"
token_valid_seconds = 7257600

[net]
port = 3000
port = 3001

[auth]
email_on_signup = "Optional"
Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Run using the pre-built public docker image:
export TORRUST_IDX_BACK_USER_UID=$(id -u)
docker run -it \
--user="$TORRUST_IDX_BACK_USER_UID" \
--publish 3000:3000/tcp \
--publish 3001:3001/tcp \
--volume "$(pwd)/storage":"/app/storage" \
torrust/index-backend
```
Expand Down Expand Up @@ -75,7 +75,7 @@ After running the "up" command you will have three running containers:
```s
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e35b14edaceb torrust-idx-back "cargo run" 19 seconds ago Up 17 seconds 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp torrust-idx-back-1
e35b14edaceb torrust-idx-back "cargo run" 19 seconds ago Up 17 seconds 0.0.0.0:3001->3001/tcp, :::3001->3001/tcp torrust-idx-back-1
ddbad9fb496a torrust/tracker:develop "/app/torrust-tracker" 19 seconds ago Up 18 seconds 0.0.0.0:1212->1212/tcp, :::1212->1212/tcp, 0.0.0.0:6969->6969/udp, :::6969->6969/udp, 7070/tcp torrust-tracker-1
f1d991d62170 mysql:8.0 "docker-entrypoint.s…" 3 hours ago Up 18 seconds (healthy) 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp torrust-mysql-1
torrust-mysql-1
Expand Down
2 changes: 1 addition & 1 deletion docker/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TORRUST_IDX_BACK_CONFIG=$(cat config.toml)

docker run -it \
--user="$TORRUST_IDX_BACK_USER_UID" \
--publish 3000:3000/tcp \
--publish 3001:3001/tcp \
--env TORRUST_IDX_BACK_CONFIG="$TORRUST_IDX_BACK_CONFIG" \
--volume "$(pwd)/storage":"/app/storage" \
torrust-index-backend
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub const FREE_PORT: u16 = 0;
/// The the base URL for the API.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Network {
/// The port to listen on. Default to `3000`.
/// The port to listen on. Default to `3001`.
pub port: u16,
/// The base URL for the API. For example: `http://localhost`.
/// If not set, the base URL will be inferred from the request.
Expand All @@ -90,7 +90,7 @@ pub struct Network {
impl Default for Network {
fn default() -> Self {
Self {
port: 3000,
port: 3001,
base_url: None,
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
//! && export TORRUST_IDX_BACK_USER_UID=1000 \
//! && docker run -it \
//! --user="$TORRUST_IDX_BACK_USER_UID" \
//! --publish 3000:3000/tcp \
//! --publish 3001:3001/tcp \
//! --volume "$(pwd)/storage":"/app/storage" \
//! torrust/index-backend
//! ```
Expand Down Expand Up @@ -167,7 +167,7 @@
//! token_valid_seconds = 7257600
//!
//! [net]
//! port = 3000
//! port = 3001
//!
//! [auth]
//! email_on_signup = "Optional"
Expand Down Expand Up @@ -223,7 +223,7 @@
//!
//! ## API
//!
//! Running the tracker with the default configuration will expose the REST API on port 3000: <http://localhost:3000>
//! Running the backend with the default configuration will expose the REST API on port 3001: <http://localhost:3001>
//!
//! ## Tracker Statistics Importer
//!
Expand Down
2 changes: 1 addition & 1 deletion src/services/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//!
//! Sample URL:
//!
//! <http://0.0.0.0:3000/v1/proxy/image/https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F2%2F21%2FMandel_zoom_00_mandelbrot_set.jpg%2F1280px-Mandel_zoom_00_mandelbrot_set.jpg>
//! <http://0.0.0.0:3001/v1/proxy/image/https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F2%2F21%2FMandel_zoom_00_mandelbrot_set.jpg%2F1280px-Mandel_zoom_00_mandelbrot_set.jpg>
use std::sync::Arc;

use bytes::Bytes;
Expand Down
6 changes: 3 additions & 3 deletions src/web/api/v1/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! --header "Content-Type: application/json" \
//! --request POST \
//! --data '{"username":"indexadmin","email":"indexadmin@torrust.com","password":"BenoitMandelbrot1924","confirm_password":"BenoitMandelbrot1924"}' \
//! http://127.0.0.1:3000/v1/user/register
//! http://127.0.0.1:3001/v1/user/register
//! ```
//!
//! **NOTICE**: The first user is automatically an administrator. Currently,
Expand All @@ -34,7 +34,7 @@
//! --header "Content-Type: application/json" \
//! --request POST \
//! --data '{"login":"indexadmin","password":"BenoitMandelbrot1924"}' \
//! http://127.0.0.1:3000/v1/user/login
//! http://127.0.0.1:3001/v1/user/login
//! ```
//!
//! **Response**
Expand Down Expand Up @@ -68,7 +68,7 @@
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request POST \
//! --data '{"name":"new category","icon":null}' \
//! http://127.0.0.1:3000/v1/category
//! http://127.0.0.1:3001/v1/category
//! ```
//!
//! **Response**
Expand Down
4 changes: 2 additions & 2 deletions src/web/api/v1/contexts/about/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! **Example request**
//!
//! ```bash
//! curl "http://127.0.0.1:3000/v1/about"
//! curl "http://127.0.0.1:3001/v1/about"
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -49,7 +49,7 @@
//! **Example request**
//!
//! ```bash
//! curl "http://127.0.0.1:3000/v1/about/license"
//! curl "http://127.0.0.1:3001/v1/about/license"
//! ```
//!
//! **Example response** `200`
Expand Down
6 changes: 3 additions & 3 deletions src/web/api/v1/contexts/category/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! **Example request**
//!
//! ```bash
//! curl "http://127.0.0.1:3000/v1/category"
//! curl "http://127.0.0.1:3001/v1/category"
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -84,7 +84,7 @@
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request POST \
//! --data '{"name":"new category","icon":null}' \
//! http://127.0.0.1:3000/v1/category
//! http://127.0.0.1:3001/v1/category
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -122,7 +122,7 @@
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request DELETE \
//! --data '{"name":"new category","icon":null}' \
//! http://127.0.0.1:3000/v1/category
//! http://127.0.0.1:3001/v1/category
//! ```
//!
//! **Example response** `200`
Expand Down
4 changes: 2 additions & 2 deletions src/web/api/v1/contexts/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
//! --header "cache-control: no-cache" \
//! --header "pragma: no-cache" \
//! --output mandelbrotset.jpg \
//! http://0.0.0.0:3000/v1/proxy/image/https%3A%2F%2Fraw.git.ttaallkk.top%2Ftorrust%2Ftorrust-index-backend%2Fdevelop%2Fdocs%2Fmedia%2Ftorrust_logo.png
//! http://0.0.0.0:3001/v1/proxy/image/https%3A%2F%2Fraw.git.ttaallkk.top%2Ftorrust%2Ftorrust-index-backend%2Fdevelop%2Fdocs%2Fmedia%2Ftorrust_logo.png
//! ```
//!
//! You will receive an image with the text "Sign in to see image" instead.
Expand All @@ -51,7 +51,7 @@
//! --header "cache-control: no-cache" \
//! --header "pragma: no-cache" \
//! --output mandelbrotset.jpg \
//! http://0.0.0.0:3000/v1/proxy/image/https%3A%2F%2Fraw.git.ttaallkk.top%2Ftorrust%2Ftorrust-index-backend%2Fdevelop%2Fdocs%2Fmedia%2Ftorrust_logo.png
//! http://0.0.0.0:3001/v1/proxy/image/https%3A%2F%2Fraw.git.ttaallkk.top%2Ftorrust%2Ftorrust-index-backend%2Fdevelop%2Fdocs%2Fmedia%2Ftorrust_logo.png
//! ```
pub mod handlers;
pub mod responses;
Expand Down
12 changes: 6 additions & 6 deletions src/web/api/v1/contexts/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//! --header "Content-Type: application/json" \
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request GET \
//! "http://127.0.0.1:3000/v1/settings"
//! "http://127.0.0.1:3001/v1/settings"
//! ```
//!
//! **Example response** `200`
Expand All @@ -41,7 +41,7 @@
//! "token_valid_seconds": 7257600
//! },
//! "net": {
//! "port": 3000,
//! "port": 3001,
//! "base_url": null
//! },
//! "auth": {
Expand Down Expand Up @@ -101,8 +101,8 @@
//! --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":3000,"base_url":null},"auth":{"email_on_signup":"Optional","min_password_length":6,"max_password_length":64,"secret_key":"MaxVerstappenWC2021"},"database":{"connect_url":"sqlite://./storage/database/data.db?mode=rwc"},"mail":{"email_verification_enabled":false,"from":"example@email.com","reply_to":"noreply@email.com","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:3000/v1/settings"
//! --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":{"email_on_signup":"Optional","min_password_length":6,"max_password_length":64,"secret_key":"MaxVerstappenWC2021"},"database":{"connect_url":"sqlite://./storage/database/data.db?mode=rwc"},"mail":{"email_verification_enabled":false,"from":"example@email.com","reply_to":"noreply@email.com","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.
Expand All @@ -124,7 +124,7 @@
//! curl \
//! --header "Content-Type: application/json" \
//! --request GET \
//! "http://127.0.0.1:3000/v1/settings/name"
//! "http://127.0.0.1:3001/v1/settings/name"
//! ```
//!
//! **Example response** `200`
Expand All @@ -147,7 +147,7 @@
//! curl \
//! --header "Content-Type: application/json" \
//! --request GET \
//! "http://127.0.0.1:3000/v1/settings/public"
//! "http://127.0.0.1:3001/v1/settings/public"
//! ```
//!
//! **Example response** `200`
Expand Down
6 changes: 3 additions & 3 deletions src/web/api/v1/contexts/tag/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! **Example request**
//!
//! ```bash
//! curl "http://127.0.0.1:3000/v1/tags"
//! curl "http://127.0.0.1:3001/v1/tags"
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -64,7 +64,7 @@
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request POST \
//! --data '{"name":"new tag"}' \
//! http://127.0.0.1:3000/v1/tag
//! http://127.0.0.1:3001/v1/tag
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -101,7 +101,7 @@
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request DELETE \
//! --data '{"tag_id":1}' \
//! http://127.0.0.1:3000/v1/tag
//! http://127.0.0.1:3001/v1/tag
//! ```
//!
//! **Example response** `200`
Expand Down
12 changes: 6 additions & 6 deletions src/web/api/v1/contexts/torrent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//! --form "description=MandelbrotSet image" \
//! --form "category=software" \
//! --form "torrent=@docs/media/mandelbrot_2048x2048_infohash_v1.png.torrent;type=application/x-bittorrent" \
//! "http://127.0.0.1:3000/v1/torrent/upload"
//! "http://127.0.0.1:3001/v1/torrent/upload"
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -63,7 +63,7 @@
//! --header "Content-Type: application/x-bittorrent" \
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --output mandelbrot_2048x2048_infohash_v1.png.torrent \
//! "http://127.0.0.1:3000/v1/torrent/download/5452869BE36F9F3350CCEE6B4544E7E76CAAADAB"
//! "http://127.0.0.1:3001/v1/torrent/download/5452869BE36F9F3350CCEE6B4544E7E76CAAADAB"
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -105,7 +105,7 @@
//! --header "Content-Type: application/json" \
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request GET \
//! "http://127.0.0.1:3000/v1/torrent/5452869BE36F9F3350CCEE6B4544E7E76CAAADAB"
//! "http://127.0.0.1:3001/v1/torrent/5452869BE36F9F3350CCEE6B4544E7E76CAAADAB"
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -191,7 +191,7 @@
//! --header "Content-Type: application/json" \
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request GET \
//! "http://127.0.0.1:3000/v1/torrents"
//! "http://127.0.0.1:3001/v1/torrents"
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -256,7 +256,7 @@
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request PUT \
//! --data '{"title":"MandelbrotSet", "description":"MandelbrotSet image"}' \
//! "http://127.0.0.1:3000/v1/torrent/5452869BE36F9F3350CCEE6B4544E7E76CAAADAB"
//! "http://127.0.0.1:3001/v1/torrent/5452869BE36F9F3350CCEE6B4544E7E76CAAADAB"
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -312,7 +312,7 @@
//! --header "Content-Type: application/json" \
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request DELETE \
//! "http://127.0.0.1:3000/v1/torrent/5452869BE36F9F3350CCEE6B4544E7E76CAAADAB"
//! "http://127.0.0.1:3001/v1/torrent/5452869BE36F9F3350CCEE6B4544E7E76CAAADAB"
//! ```
//!
//! **Example response** `200`
Expand Down
10 changes: 5 additions & 5 deletions src/web/api/v1/contexts/user/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
//! --header "Content-Type: application/json" \
//! --request POST \
//! --data '{"username":"indexadmin","email":"indexadmin@torrust.com","password":"BenoitMandelbrot1924","confirm_password":"BenoitMandelbrot1924"}' \
//! http://127.0.0.1:3000/v1/user/register
//! http://127.0.0.1:3001/v1/user/register
//! ```
//!
//! For more information about the registration process, refer to the [`auth`](crate::web::api::v1::auth)
Expand Down Expand Up @@ -107,7 +107,7 @@
//! --header "Content-Type: application/json" \
//! --request POST \
//! --data '{"login":"indexadmin","password":"BenoitMandelbrot1924"}' \
//! http://127.0.0.1:3000/v1/user/login
//! http://127.0.0.1:3001/v1/user/login
//! ```
//!
//! For more information about the login process, refer to the [`auth`](crate::web::api::v1::auth)
Expand Down Expand Up @@ -135,7 +135,7 @@
//! --header "Content-Type: application/json" \
//! --request POST \
//! --data '{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI"}' \
//! http://127.0.0.1:3000/v1/user/token/verify
//! http://127.0.0.1:3001/v1/user/token/verify
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -181,7 +181,7 @@
//! --header "Content-Type: application/json" \
//! --request POST \
//! --data '{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI"}' \
//! http://127.0.0.1:3000/v1/user/token/renew
//! http://127.0.0.1:3001/v1/user/token/renew
//! ```
//!
//! **Example response** `200`
Expand Down Expand Up @@ -227,7 +227,7 @@
//! --header "Content-Type: application/json" \
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \
//! --request DELETE \
//! http://127.0.0.1:3000/v1/user/ban/indexadmin
//! http://127.0.0.1:3001/v1/user/ban/indexadmin
//! ```
//!
//! **Example response** `200`
Expand Down
Loading

0 comments on commit ba8b2c2

Please sign in to comment.