-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improved AddSharedAccount function #14
Conversation
Added parameter checks. Database insert checks. Returns boolean and error message if needed.
removed exports from fxmanifest and added inside server/main.lua
Instead of returning "success" it now returns the account on success
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know how to feel about returning error reasons/messages. I don't see how that would be of use to third-party resources. I think you should just throw an error instead.
- Changed return value from `true/false` to return the account table on success and `nil` on failure. - Error if parameters or DB insertion are not success. - Removed redundant checks
Corrected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
Improved the AddSharedAccount() function. Now returns boolean with message. Added checks to validate parsed parameters. Also check for database insertion.
Removed exports from fxmanifest (as suggested earlier) and added directly inside server/main.lua