@@ -29,6 +29,7 @@ export default class IndexRoute extends Route {
2929 @tracked policyURL = '' ;
3030 @tracked policyMethod = '' ;
3131 @tracked policyContentType = '' ;
32+ @tracked policyRedirectUrl = '' ;
3233
3334 async model ( { form } ) {
3435 await this . solidAuth . ensureLogin ( ) ;
@@ -240,8 +241,8 @@ export default class IndexRoute extends Route {
240241 ?id pol:policy ?policy .
241242 ?policy a fno:Execution .
242243 ?policy fno:executes ?executionTarget .
243- ?policy ex:method ?method .
244244 ?policy ex:url ?url .
245+ OPTIONAL { ?policy ex:method ?method } .
245246 OPTIONAL { ?policy ex:contentType ?contentType } .
246247 }
247248 ` ;
@@ -261,8 +262,8 @@ export default class IndexRoute extends Route {
261262 const policies = bindings . map ( ( row ) => {
262263 return {
263264 executionTarget : row . get ( 'executionTarget' ) . value ,
264- method : row . get ( 'method' ) . value ,
265265 url : row . get ( 'url' ) . value ,
266+ method : row . get ( 'method' ) ?. value ,
266267 contentType : row . get ( 'contentType' ) ?. value ,
267268 } ;
268269 } ) ;
@@ -273,6 +274,8 @@ export default class IndexRoute extends Route {
273274 this . policyURL = policy . url ;
274275 this . policyMethod = policy . method ;
275276 this . policyContentType = policy . contentType ;
277+ } else if ( policy . executionTarget === 'http://example.org/redirect' ) {
278+ this . policyRedirectUrl = policy . url ;
276279 }
277280 }
278281 }
0 commit comments