Projet

Général

Profil

0001-api-return-formdata-URLs-in-ApiFormdefDirectory.subm.patch

Benjamin Dauvergne, 19 mai 2018 16:12

Télécharger (1,01 ko)

Voir les différences:

Subject: [PATCH] api: return formdata URLs in ApiFormdefDirectory.submit()
 (#23939)

So that we do not need another roundtrip to have those informations.
 wcs/api.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
wcs/api.py
334 334
            formdata.store()
335 335
            formdata.perform_workflow()
336 336
            formdata.store()
337
        return json.dumps({'err': 0, 'data': {'id': formdata.id}})
337
        return json.dumps({
338
            'err': 0,
339
            'data': {
340
                'id': formdata.id,
341
                'url': formdata.get_url(),
342
                'url_backoffice': formdata.get_url(backoffice=True)
343
            }
344
        })
338 345

  
339 346

  
340 347
class ApiFormdefsDirectory(Directory):
341
-