Skip to content

Commit f02eeca

Browse files
committed
feat(scala): scope variables
1 parent d111dc4 commit f02eeca

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

templates/scala/guides/search/saveObjectsPublicUser.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import scala.concurrent.duration.Duration
66
{{> snippets/import}}
77
import algoliasearch.config.RequestOptions
88

9-
val playlists: Seq[Any] = Seq() // Your records
10-
119
def saveObjectsPublicUser(): Future[Unit] = {
10+
val playlists: Seq[Any] = Seq() // Your records
11+
1212
{{> snippets/init}}
1313

1414
Await.result(

templates/scala/guides/search/setHeaderUserIDThenSaveObjects.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import scala.concurrent.duration.Duration
55

66
{{> snippets/import}}
77

8-
val playlists: Seq[Any] = Seq() // Your records
9-
108
def setHeaderUserIDThenSaveObjects(): Future[Unit] = {
9+
val playlists: Seq[Any] = Seq() // Your records
10+
1111
{{> snippets/init}}
1212

1313
playlists.foreach { playlist =>

templates/scala/guides/search/setSettingsThenSaveObjects.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import scala.concurrent.duration.Duration
66
{{> snippets/import}}
77
import algoliasearch.search.IndexSettings
88

9-
val playlists: Seq[Map[String, Any]] = Seq()
10-
119
val getAppIDFor: String => String = _ => {
1210
"" // Implement your own logic here
1311
}
@@ -16,6 +14,8 @@ val getIndexingApiKeyFor: String => String = _ => {
1614
}
1715

1816
def setSettingsThenSaveObjects(): Future[Unit] = {
17+
val playlists: Seq[Map[String, Any]] = Seq() // Your records
18+
1919
playlists.foreach { playlist =>
2020
// Fetch from your own data storage and with your own code
2121
// the associated application ID and API key for this user

0 commit comments

Comments
 (0)