remove the /all functionality completely
This commit is contained in:
parent
a793e3d22c
commit
16f9def792
1 changed files with 0 additions and 9 deletions
|
@ -37,15 +37,6 @@ func (a *App) Initialize(dbDriver string, dbURI string) {
|
|||
db.AutoMigrate(&urlEntry{})
|
||||
}
|
||||
|
||||
// ListAll returns a JSON response of all the url entries in the database
|
||||
func (a *App) ListAll(w http.ResponseWriter, r *http.Request) {
|
||||
res := &[]urlEntry{}
|
||||
a.DB.Find(res)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(res)
|
||||
}
|
||||
|
||||
// GetURL takes a shortlink and redirects the user to the relevant link if it exists
|
||||
func (a *App) GetURL(w http.ResponseWriter, r *http.Request) {
|
||||
u := &urlEntry{}
|
||||
|
|
Loading…
Reference in a new issue