Skip to content

Some currently existing issues in staff-api src #80

@dukenguyenxyz

Description

@dukenguyenxyz

It'd be quite annoying to open each issue for each of these dot points, so instead of doing so, I've created this issue which is comprised of all of the problems which I have found currently with staff-api.

For each dot point, only one reference example is included, please fix all other existing similar problems

Style

  • Prefer unless over if !(expression), example

Ameba did not run here probably due to it not going into the deeper macro context

Refactor

  • Store ENVS as constants in a single file, example: 1

Security

  • User var() for query sanitisation like here instead of this

Optimisation

  • User find_or_create instead of this

Mass Assignment

Prevent mass assignment of fields like id, and implement direct deserialisation, i.e. create_from_json

examples

For this example, I'm not sure why we are serialising credentials here though

Double serialisation

examples

#as_json for selective serialisation

Implement #as_json or expand [Clear JSONDeserialise model to accept annotation as macro arg in

examples

Metadata

Metadata

Assignees

Labels

type: bugsomething isn't workingtype: discussionIssue that can be resolved with discussion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions