1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-24 12:25:57 +00:00
Former-commit-id: 0f0667f7e460dc241f3a8fcca50cc6caf228d081
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-10-10 05:17:53 +03:00
parent 82b5a1d4ed
commit 7ab607aab2
6 changed files with 12 additions and 16 deletions

View File

@@ -471,7 +471,7 @@ type Movie struct {
// simple checks can be added here.
//
// It's just a showcase,
// imagine what possible this opens when you designing a bigger application.
// imagine the potentials this feature gives when designing a bigger application.
//
// This is called where the return value from a controller's method functions
// is type of `Movie`.
@@ -700,7 +700,7 @@ func (s *MovieMemoryService) GetAll() []models.Movie {
```go
// file: controllers/movies_controller.go
// file: controllers/movie_controller.go
package controllers
@@ -770,7 +770,6 @@ func (c *MovieController) PutBy(id int64) (models.Movie, error) {
// Demo:
// curl -i -X DELETE -u admin:password http://localhost:8080/movies/1
func (c *MovieController) DeleteBy(id int64) interface{} {
// delete the entry from the movies slice.
wasDel := c.Service.DeleteByID(id)
if wasDel {
// and return the deleted movie's ID