hackers4peace / plp-provider

Definitions and reference implementation for Provider working with PLP
provider.plp.hackers4peace.net
1 stars 1 forks source link

Update profile if already exists #3

Closed acorbi closed 9 years ago

acorbi commented 9 years ago

Provider exposes the "/" URL where applications can POST a profile in order to be stored. However if the posted profile does already exists it won't be update but a new one will be created instead.

API method POST / has to be modified so the provider checks first if the posted profile includes a @id field. In that case ( which means that the profile has been edited in an editor and not just created ), the provider will extract the profile from file system, modifiy it and then send it back as the provider is expected to do with new profiles.

elf-pavlik commented 9 years ago

If request uses POST and profile in payload includes @id let's just return HTTP 409 40af546 Could you update editor to use PUT?

acorbi commented 9 years ago

Implemented