Skip to content

Commit

Permalink
fix method name
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidenori Maehara committed Nov 16, 2017
1 parent 0dfbb5a commit 4604758
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ class CustomerFilmRestController(
* 一覧
*/
@GetMapping
@ApiOperation("映画一覧取得", nickname = "get_films")
@ApiOperation("映画一覧取得", nickname = "customer_get_films")
fun index(): List<FilmResource>
= filmApplicationService.findAll().map(::FilmResource)

/**
* 詳細
*/
@GetMapping("{id}")
@ApiOperation("映画詳細取得", nickname = "get_film")
@ApiOperation("映画詳細取得", nickname = "customer_get_film")
fun show(@PathVariable id: Int): FilmResource
= filmApplicationService.findById(id).let { FilmResource(it) }

/**
* 検索
*/
@GetMapping("search")
@ApiOperation("映画検索", nickname = "search_films")
@ApiOperation("映画検索", nickname = "customer_search_films")
fun search(): List<FilmResource>
= filmApplicationService.search().map(::FilmResource)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ class StaffFilmRestController(
private val filmApplicationService: FilmApplicationService
) {
@GetMapping
@ApiOperation("映画一覧取得", nickname = "get_films")
@ApiOperation("映画一覧取得", nickname = "staff_get_films")
fun index(): List<FilmResource>
= filmApplicationService.findAll().map(::FilmResource)

@GetMapping("{id}")
@ApiOperation("映画詳細取得", nickname = "get_film")
@ApiOperation("映画詳細取得", nickname = "staff_get_film")
fun show(@PathVariable id: Int): FilmResource
= filmApplicationService.findById(id).let { FilmResource(it) }

@GetMapping("search")
@ApiOperation("映画検索", nickname = "search_films")
@ApiOperation("映画検索", nickname = "staff_search_films")
fun search(): List<FilmResource>
= filmApplicationService.search().map(::FilmResource)

@PostMapping
@ResponseStatus(HttpStatus.CREATED)
@ApiOperation("映画作成", nickname = "create_film")
@ApiOperation("映画作成", nickname = "staff_create_film")
fun create(@RequestBody @Validated filmRestParam: FilmRestParam): Int {
val command = FilmCommand(
title = filmRestParam.title,
Expand All @@ -52,7 +52,7 @@ class StaffFilmRestController(
}

@PutMapping("{id}")
@ApiOperation("映画編集", nickname = "update_film")
@ApiOperation("映画編集", nickname = "staff_update_film")
fun update(
@PathVariable id: Int,
@RequestBody @Validated filmRestParam: FilmRestParam
Expand All @@ -75,7 +75,7 @@ class StaffFilmRestController(
}

@DeleteMapping("{id}")
@ApiOperation("映画削除", nickname = "delete_film")
@ApiOperation("映画削除", nickname = "staff_delete_film")
fun delete(@PathVariable id: Int)
= filmApplicationService.delete(id)

Expand Down

0 comments on commit 4604758

Please sign in to comment.