removed custom tags on source creation. Generates errors that we dont need currently (#19)
This commit is contained in:
parent
206251a3d1
commit
06e50f956a
14
docs/docs.go
14
docs/docs.go
@ -175,13 +175,6 @@ const docTemplate = `{
|
||||
"name": "url",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tags",
|
||||
"name": "tags",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
@ -209,13 +202,6 @@ const docTemplate = `{
|
||||
"name": "url",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tags",
|
||||
"name": "tags",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
|
@ -166,13 +166,6 @@
|
||||
"name": "url",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tags",
|
||||
"name": "tags",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
@ -200,13 +193,6 @@
|
||||
"name": "url",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "tags",
|
||||
"name": "tags",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
|
@ -165,11 +165,6 @@ paths:
|
||||
name: url
|
||||
required: true
|
||||
type: string
|
||||
- description: tags
|
||||
in: query
|
||||
name: tags
|
||||
required: true
|
||||
type: string
|
||||
responses: {}
|
||||
summary: Creates a new twitch source to monitor.
|
||||
tags:
|
||||
@ -189,11 +184,6 @@ paths:
|
||||
name: url
|
||||
required: true
|
||||
type: string
|
||||
- description: tags
|
||||
in: query
|
||||
name: tags
|
||||
required: true
|
||||
type: string
|
||||
responses: {}
|
||||
summary: Creates a new youtube source to monitor.
|
||||
tags:
|
||||
|
@ -121,7 +121,7 @@ func (s *Server) newRedditSource(w http.ResponseWriter, r *http.Request) {
|
||||
query := r.URL.Query()
|
||||
_name := query["name"][0]
|
||||
_url := query["url"][0]
|
||||
_tags := query["tags"][0]
|
||||
//_tags := query["tags"][0]
|
||||
|
||||
if _url == "" {
|
||||
http.Error(w, "url is missing a value", http.StatusBadRequest)
|
||||
@ -132,7 +132,15 @@ func (s *Server) newRedditSource(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tags := fmt.Sprintf("reddit, %v, %v", _name, _tags)
|
||||
/*
|
||||
var tags string
|
||||
if _tags == "" {
|
||||
tags = fmt.Sprintf("twitch, %v", _name)
|
||||
} else {
|
||||
}
|
||||
*/
|
||||
tags := fmt.Sprintf("twitch, %v", _name)
|
||||
|
||||
params := database.CreateSourceParams{
|
||||
ID: uuid.New(),
|
||||
Site: "reddit",
|
||||
@ -157,14 +165,13 @@ func (s *Server) newRedditSource(w http.ResponseWriter, r *http.Request) {
|
||||
// @Summary Creates a new youtube source to monitor.
|
||||
// @Param name query string true "name"
|
||||
// @Param url query string true "url"
|
||||
// @Param tags query string true "tags"
|
||||
// @Tags Config, Source, YouTube
|
||||
// @Router /config/sources/new/youtube [post]
|
||||
func (s *Server) newYoutubeSource(w http.ResponseWriter, r *http.Request) {
|
||||
query := r.URL.Query()
|
||||
_name := query["name"][0]
|
||||
_url := query["url"][0]
|
||||
_tags := query["tags"][0]
|
||||
//_tags := query["tags"][0]
|
||||
|
||||
if _url == "" {
|
||||
http.Error(w, "url is missing a value", http.StatusBadRequest)
|
||||
@ -175,7 +182,14 @@ func (s *Server) newYoutubeSource(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tags := fmt.Sprintf("youtube, %v, %v", _name, _tags)
|
||||
/*
|
||||
if _tags == "" {
|
||||
tags = fmt.Sprintf("twitch, %v", _name)
|
||||
} else {
|
||||
}
|
||||
*/
|
||||
tags := fmt.Sprintf("twitch, %v", _name)
|
||||
|
||||
params := database.CreateSourceParams{
|
||||
ID: uuid.New(),
|
||||
Site: "youtube",
|
||||
@ -200,14 +214,13 @@ func (s *Server) newYoutubeSource(w http.ResponseWriter, r *http.Request) {
|
||||
// @Summary Creates a new twitch source to monitor.
|
||||
// @Param name query string true "name"
|
||||
// @Param url query string true "url"
|
||||
// @Param tags query string true "tags"
|
||||
// @Tags Config, Source, Twitch
|
||||
// @Router /config/sources/new/twitch [post]
|
||||
func (s *Server) newTwitchSource(w http.ResponseWriter, r *http.Request) {
|
||||
query := r.URL.Query()
|
||||
_name := query["name"][0]
|
||||
_url := query["url"][0]
|
||||
_tags := query["tags"][0]
|
||||
//_tags := query["tags"][0]
|
||||
|
||||
if _url == "" {
|
||||
http.Error(w, "url is missing a value", http.StatusBadRequest)
|
||||
@ -218,7 +231,17 @@ func (s *Server) newTwitchSource(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tags := fmt.Sprintf("twitch, %v, %v", _name, _tags)
|
||||
var tags string
|
||||
/*
|
||||
if _tags == "" {
|
||||
tags = fmt.Sprintf("twitch, %v", _name)
|
||||
} else {
|
||||
|
||||
}
|
||||
*/
|
||||
//tags = fmt.Sprintf("twitch, %v, %v", _name, _tags)
|
||||
tags = fmt.Sprintf("twitch, %v", _name)
|
||||
|
||||
params := database.CreateSourceParams{
|
||||
ID: uuid.New(),
|
||||
Site: "twitch",
|
||||
|
Loading…
Reference in New Issue
Block a user