Rewrite filter and preference mutations (#577)

This commit is contained in:
Mitchell Syer
2023-06-24 12:28:11 -04:00
committed by GitHub
parent 08af195f11
commit b9b115d0ea
5 changed files with 318 additions and 45 deletions

View File

@@ -135,7 +135,7 @@ object SourceController {
},
behaviorOf = { ctx, sourceId ->
val preferenceChange = ctx.bodyAsClass(SourcePreferenceChange::class.java)
ctx.json(Source.setSourcePreference(sourceId, preferenceChange))
ctx.json(Source.setSourcePreference(sourceId, preferenceChange.position, preferenceChange.value))
},
withResults = {
httpCode(HttpCode.OK)