Skip to content

Commit

Permalink
refactor: changing locale param to lang
Browse files Browse the repository at this point in the history
  • Loading branch information
daithihearn committed Nov 3, 2023
1 parent c069f0c commit f328258
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.0
1.18.0
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ help:

build: #@ Build local
./gradlew clean build
.PHONY:build
image: #@ Build docker image
docker build -t electricity-prices . --load
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.springframework.boot.runApplication
info = Info(
title =
"Electricity Prices API",
version = "1.17.0",
version = "1.18.0",
description = "Returns PVPC electricity prices for a given range"
),
servers = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class AlexaSkillController(
ApiResponse(responseCode = "200", description = "Request successful")
)
@ResponseBody
fun getFullFeed(@RequestParam(value = "locale", required = false) locale: String?): AlexaSkillResponse {
val resolvedLocale = locale?.let { Locale.forLanguageTag(it) } ?: Locale.forLanguageTag("es")
fun getFullFeed(@RequestParam(value = "lang", required = false) lang: String?): AlexaSkillResponse {
val resolvedLocale = lang?.let { Locale.forLanguageTag(it) } ?: Locale.forLanguageTag("es")
return wrapInSkillResponse(
message = alexSkillService.getFullFeed(resolvedLocale),
title = messageSource.getMessage("alexa.full.title", emptyArray(), resolvedLocale)
Expand Down

0 comments on commit f328258

Please sign in to comment.