summary refs log tree commit diff stats
path: root/main.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-14 20:53:40 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-14 20:53:40 -0400
commitdfab6f205088e50bab66485359e9d9c85777a221 (patch)
tree8128c2649b499cd9dda4eca18d3b3343c04a0a95 /main.go
parentbeda2eb42a0a87f1a98be1fcac02edc2b9d20004 (diff)
downloadgetwtxt-dfab6f205088e50bab66485359e9d9c85777a221.tar.gz
allowing underscore and hyphen in users/tags
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 8e3a2b2..4b62f27 100644
--- a/main.go
+++ b/main.go
@@ -48,7 +48,7 @@ func main() {
 		HandlerFunc(apiEndpointHandler)
 	// This is for submitting new users
 	api.Path("/{format:(?:plain)}/{endpoint:users}").
-		Queries("url", "{url}", "nickname", "{nickname:[a-zA-Z0-9]+}").
+		Queries("url", "{url}", "nickname", "{nickname:[a-zA-Z0-9_-]+}").
 		Methods("POST").
 		HandlerFunc(apiEndpointPOSTHandler)
 	// Show all observed tags
@@ -56,7 +56,7 @@ func main() {
 		Methods("GET").
 		HandlerFunc(apiTagsBaseHandler)
 	// Requests tweets with a specific tag
-	api.Path("/{format:(?:plain)}/tags/{tags:[a-zA-Z0-9]+}").
+	api.Path("/{format:(?:plain)}/tags/{tags:[a-zA-Z0-9_-]+}").
 		Methods("GET").
 		HandlerFunc(apiTagsHandler)