Closed muyunli123 closed 1 week ago
I wonder why adding like and dislike to deserialize() will cause errors?
I wonder why adding like and dislike to deserialize() will cause errors?
Because deserialize() is used in create() and update() where the input information will be parsed. But like and dislike are set to 0 when created and added 1 each time Like and Dislike is called. So it is not an information given by the users, but more like the attributes created_at and updated_at.
I wonder why adding like and dislike to deserialize() will cause errors?
Because deserialize() is used in create() and update() where the input information will be parsed. But like and dislike are set to 0 when created and added 1 each time Like and Dislike is called. So it is not an information given by the users, but more like the attributes created_at and updated_at.
Got it! Thanks for the explanation.
deleted like and dislike from deserialize() to fix data validation error