Are Javascript functions/methods that do not get exported safe to use? : javascript

05/02/2018


Lets say I have a fetch request (or an axios request), and on success I want something to happen. If i move what I want to happen into a seperate function/method and call it in the success area, is this a safe practice? Or does that leave me vulnerable to someone learning how to call the function itself and bypass my fetch request.

Example image

https://imgur.com/a/hQJxQ

Cheers,
Hyden

قالب وردپرس