From 8efe5c4c7ad5ece4f94707e90c7bfe8ec2c07216 Mon Sep 17 00:00:00 2001 From: 123niel Date: Thu, 7 Feb 2019 17:02:55 +0100 Subject: [PATCH] fixed style issues in README.md and main.go --- README.md | 30 +++++++++++++++++------------- main.go | 1 + 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 618bbb1..b1c8c01 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,20 @@ # tsviewer **[WIP]** A TS3 Viewer with REST API. -I´m a sick Fuck i like the sick F09ck -## DOCKER-Config +## Config + +### Docker-Config ```bash docker build -t name/cont:ver . docker run -e TS3_IP="" -e TS3_PW="" -e WEB_PORT="8080" -d -p 8080:8080 name/cont:ver ``` -ENV: -```Docker +ENV: + +```Docker ENV TS3_IP=127.0.0.1 ENV TS3_NAME=serveradmin ENV TS3_PW= @@ -20,15 +22,12 @@ ENV TS3_PORT=9987 ENV TS3_QUERY=10011 ENV WEB_PORT=8080 ENV BLACKLIST_USER=USER - - ``` -# Features - -## Config +### API-Config The config file is generated automatically on first startup. + ```json { "user": { @@ -47,17 +46,20 @@ The config file is generated automatically on first startup. } ``` -## URL-Parameter +## Features + +### URL-Parameter | Name | Type | Description | | ---------- | ------ | ------------------------ | | `pretty` | `bool` | pretty-prints JSON | | `envelope` | `bool` | wraps JSON in data array | -## Channels +### Channels - **`GET`** `/v1/channels/:id` - **`GET`** `/v1/channels` + ```json { "databaseId": 1, @@ -69,10 +71,11 @@ The config file is generated automatically on first startup. } ``` -## Clients +### Clients - **`GET`** `/v1/clients/:id` - **`GET`** `/v1/clients/` + ```json { "id": 1, @@ -85,9 +88,10 @@ The config file is generated automatically on first startup. } ``` -## Server +### Server - **`GET`** `/v1/server/info` + ```json { "name": "TeamSpeak ]I[ Server", diff --git a/main.go b/main.go index 1480e3f..128d0f6 100644 --- a/main.go +++ b/main.go @@ -19,6 +19,7 @@ import ( "github.com/go-chi/cors" ) +// Routes includes middleware and distributes request to different Routers func Routes(s service.Service, t template.Template) *chi.Mux { router := chi.NewRouter() cors := cors.New(cors.Options{