* Apply fold
in redirectToAction
; bump version -> 1.1.4+9
This commit is contained in:
parent
bace6a2298
commit
93f0dae1eb
3 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
# 1.1.4+9
|
# 1.1.4+9
|
||||||
* Patch `ResponseContext.redirectTo` to `fold` parameters, instead of
|
* Patch `ResponseContext.redirectTo` to `fold` parameters, instead of
|
||||||
`as`-casting them to `Map<String, dynamic>`.
|
`as`-casting them to `Map<String, dynamic>`.
|
||||||
|
* Apply this same folding to `ResponseContext.redirectToAction`.
|
||||||
|
|
||||||
# 1.1.4+8
|
# 1.1.4+8
|
||||||
* Finalizers can now write to the response buffer or send headers,
|
* Finalizers can now write to the response buffer or send headers,
|
||||||
|
|
|
@ -303,7 +303,9 @@ abstract class ResponseContext implements StreamSink<List<int>>, StringSink {
|
||||||
final head =
|
final head =
|
||||||
controller.findExpose().path.toString().replaceAll(_straySlashes, '');
|
controller.findExpose().path.toString().replaceAll(_straySlashes, '');
|
||||||
final tail = matched
|
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, '');
|
.replaceAll(_straySlashes, '');
|
||||||
|
|
||||||
redirect('$head/$tail'.replaceAll(_straySlashes, ''), code: code);
|
redirect('$head/$tail'.replaceAll(_straySlashes, ''), code: code);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_framework
|
name: angel_framework
|
||||||
version: 1.1.4+8
|
version: 1.1.4+9
|
||||||
description: A high-powered HTTP server with DI, routing and more.
|
description: A high-powered HTTP server with DI, routing and more.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/angel_framework
|
homepage: https://github.com/angel-dart/angel_framework
|
||||||
|
|
Loading…
Reference in a new issue