File tree Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1+ { {> snippets/import} }
2+ import com.algolia.client.model.search.*
3+
4+ suspend fun setHeaderUserIDThenSaveObjects() {
5+ {{> snippets/init} }
6+
7+ playlists.foreach { playlist ->
8+ val playlistUserID = playlist[" userID" ].toString()
9+ client.{{#dynamicSnippet} }saveObjectsPlaylistsWithRequestOptions{ {/dynamicSnippet} }
10+ }
11+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ def setHeaderUserIDThenSaveObjects(): Future[Unit] = {
99 {{> snippets/init} }
1010
1111 playlists.foreach { playlist =>
12+ val playlistUserID = playlist(" userID" ).toString()
1213 Await.result(
1314 {{#dynamicSnippet} }saveObjectsPlaylistsWithRequestOptions{ {/dynamicSnippet} },
1415 Duration(5, "sec")
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ func setHeaderUserIDThenSaveObjects() async throws {
1111 {{> snippets/init} }
1212
1313 for playlist in playlists {
14+ let playlistUserID = playlist.userID
1415 {{#dynamicSnippet} }saveObjectsPlaylistsWithRequestOptions{ {/dynamicSnippet} }
1516 }
1617 } catch {
Original file line number Diff line number Diff line change 6969 },
7070 "requestOptions" : {
7171 "headers" : {
72- "X-Algolia-User-ID" : " $var: playlist.userID "
72+ "X-Algolia-User-ID" : " $var: playlistUserID "
7373 }
7474 }
7575 },
You can’t perform that action at this time.
0 commit comments