It is okay if it works but not recommended because its difficult to maintain it. Imagine passing through many lines of code, find one line and trying to make some changes its difficult. So you could make the code more readable by arranging properly your APIs like implementing it in different file.
It is okay if it works but not recommended because its difficult to maintain it. Imagine passing through many lines of code, find one line and trying to make some changes its difficult. So you could make the code more readable by arranging properly your APIs like implementing it in different file.