diff --git a/app/controllers/RelayRound.scala b/app/controllers/RelayRound.scala index 955556a76702..152aabaf0097 100644 --- a/app/controllers/RelayRound.scala +++ b/app/controllers/RelayRound.scala @@ -114,7 +114,7 @@ final class RelayRound( json = doApiShow(id) ) - def apiShow(ts: String, rs: String, id: RelayRoundId) = AnonOrScoped(_.Study.Read): + def apiShow(ts: String, rs: String, id: RelayRoundId) = AnonOrScoped(_.Study.Read, _.Web.Mobile): doApiShow(id) private def doApiShow(id: RelayRoundId)(using Context): Fu[Result] = diff --git a/modules/web/src/main/CtrlErrors.scala b/modules/web/src/main/CtrlErrors.scala index 2f6118be370c..66b6ced646e5 100644 --- a/modules/web/src/main/CtrlErrors.scala +++ b/modules/web/src/main/CtrlErrors.scala @@ -32,7 +32,7 @@ trait CtrlErrors extends ControllerHelpers: .mapValues: errors => JsArray: errors.map: e => - JsString(I18nKey(e.message).txt(e.args)) + JsString(I18nKey(e.message).txt(e.args*)) .toMap json.validate(jsonGlobalErrorRenamer).getOrElse(json) diff --git a/ui/bits/src/bits.cropDialog.ts b/ui/bits/src/bits.cropDialog.ts index ad3aaf3d140d..1aed230a3437 100644 --- a/ui/bits/src/bits.cropDialog.ts +++ b/ui/bits/src/bits.cropDialog.ts @@ -92,14 +92,14 @@ export async function initModule(o?: CropOpts) { maxWidth: opts.max?.pixels, maxHeight: opts.max?.pixels, }); - const tryQuality = (quality = 0.9) => { + const tryQuality = (quality = 1) => { canvas.toBlob( blob => { if (blob && blob.size < (opts.max?.megabytes ?? 100) * 1024 * 1024) submit(blob); else if (blob && quality > 0.05) tryQuality(quality * 0.9); else submit(false, 'Rendering failed'); }, - 'image/jpeg', + 'image/png', quality, ); };