chariot-dev / chariot

IoT Sensor Framework
GNU Lesser General Public License v3.0
5 stars 4 forks source link

Can't Modify Just Network Description #49

Closed hojohn2561 closed 4 years ago

hojohn2561 commented 4 years ago

When changing a network's configuration, currently have to change network name. Can't change just its description.

Juan-Garcia96 commented 4 years ago

[apiFramework 4ee39b8] bugFix: 49 - allow for modification of description without having to alter a network name via PUT request

hojohn2561 commented 4 years ago

Not working

Juan-Garcia96 commented 4 years ago

This works while I test on Yarc.

hojohn2561 commented 4 years ago

Getting "Network1 is not a unique networkName in this collection."

Juan-Garcia96 commented 4 years ago

I just tried it again and it works, can you be more specific in what you are testing? That error seems more like there is already a network named Network1 so you can't change it to that name... Note that modification is a PUT request

hojohn2561 commented 4 years ago

What branch are you on?

hojohn2561 commented 4 years ago

I'm not changing the name field, just the description field. I'm on the guiBugFixes branch off of master I created today. Yes, I'm creating a put request. I only have one network created, so there shouldn't be one with a duplicate name. It works when I change network name and description, but not just description.

Juan-Garcia96 commented 4 years ago

databaseManager (which was merged into master). I know, changing the description and not name is possible. That is what I am testing. Via the PUT request and this payload: { "networkName":"testThree", "description":"change" } so the network testThree would just have the description updated

hojohn2561 commented 4 years ago

Ok. So it seems like I have to exclude the newNetworkName field. Interesting because I didn't change the payload after pulling from master. It seems like it's currently not reflected in master.

hojohn2561 commented 4 years ago

Msater also has the keys in capital (e.g., "NetworkName", "NewName", and "Description", so maybe it's out of date?

hojohn2561 commented 4 years ago

Fixed https://github.com/chariot-dev/chariot/commit/517c1c86545bd5e4a09f96907abd5838eecf8229