Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Appointment].saveChanges() does not take effect #136

Open
wipeautcrafter opened this issue Jun 10, 2019 · 6 comments
Open

[Appointment].saveChanges() does not take effect #136

wipeautcrafter opened this issue Jun 10, 2019 · 6 comments
Labels

Comments

@wipeautcrafter
Copy link

const toggleDone = async (appointment) => {
  appointment.isDone = !appointment.isDone;
  await appointment.saveChanges();
};

This simple function does nothing more than toggling the isDone property.
Sadly, when running this, it fails to take effect...

Am I doing something wrong, or is this a legitimate issue?
Does this work for you guys?

@jvdoorn
Copy link
Contributor

jvdoorn commented Jun 11, 2019

Is it possible that it is not possible for you to update that property? If you go to Magister, are you able to toggle it there?

@lieuwex lieuwex added the bug label Jun 11, 2019
@wipeautcrafter
Copy link
Author

wipeautcrafter commented Jun 12, 2019

afbeelding

When doing the exact same thing in Magister itself, it works just fine...
Perhaps there is something wrong with the request?
Does this work for you?

EDIT:
It seems like the request you make from Magister.JS is missing the Bijlagen, TaakAangemaaktOp en TaakGewijzigdOp properties... That should not matter though, I think?

@jvdoorn
Copy link
Contributor

jvdoorn commented Jun 12, 2019

Sadly I don't really have access to a Magister account anymore (finished school... that is assuming I passed my exams which I'll find out today) so I can't test it for you.

Regarding your edit, it might make a difference, I'm not sure how they validate the requests. You could try adding the fields but I'm not sure where they should be added (I'd have to take a look at the code again).

@LevitatingBusinessMan
Copy link
Contributor

@jvdoorn I can send you my credentials for testing purposes if you want to continue working on the project. More importantly, did you pass?

@jvdoorn
Copy link
Contributor

jvdoorn commented Jun 20, 2019

I did pass 😃, I sent you an e-mail regarding the credentials 😉

@wipeautcrafter
Copy link
Author

I have looked into this issue recently and I am 99% sure it has to do with the toMagister method. It is missing crucial fields which might be why Magister is denying the request. When I have time I will update the fields and make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants