* Apply fold in redirectToAction; bump version -> 1.1.4+9

This commit is contained in:
Tobe O 2018-07-09 11:24:39 -04:00
parent bace6a2298
commit 93f0dae1eb
3 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,7 @@
# 1.1.4+9
* Patch `ResponseContext.redirectTo` to `fold` parameters, instead of
`as`-casting them to `Map<String, dynamic>`.
* Apply this same folding to `ResponseContext.redirectToAction`.
# 1.1.4+8
* Finalizers can now write to the response buffer or send headers,

View file

@ -303,7 +303,9 @@ abstract class ResponseContext implements StreamSink<List<int>>, StringSink {
final head =
controller.findExpose().path.toString().replaceAll(_straySlashes, '');
final tail = matched
.makeUri(params as Map<String, dynamic>)
.makeUri(params.keys.fold<Map<String, dynamic>>({}, (out, k) {
return out..[k.toString()] = params[k];
}))
.replaceAll(_straySlashes, '');
redirect('$head/$tail'.replaceAll(_straySlashes, ''), code: code);

View file

@ -1,5 +1,5 @@
name: angel_framework
version: 1.1.4+8
version: 1.1.4+9
description: A high-powered HTTP server with DI, routing and more.
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_framework