Ajax doesn’t execute if condition statements in the controller’s function in codeigniter 4

I’m just beginning to learn jQuery and Ajax along with Codeigniter 4 framework, I have encountered this problem when trying to update some columns in database with Ajax, it happened that Ajax works totally fine and update the data on database through the update function but if condition statement not touched by Ajax through the url, what could a problem?

I expected the Ajax to execute the whole function but it doesn’t