[rewrite] Initial project structure with dashboard frontend and api
This commit is contained in:
1 parent
c018d2fb52
commit
40aa0295b1
70 files changed
+19923
-214
No files matched your search
@@ -0,0 +1,6 @@
|
||||
PRODUCT_LISTING_CREATED_SUCCESSFULLY = {"msg": "Successfully created a brand new product."}, 201
|
||||
|
||||
NOT_OWNER_OF_PRODUCT = {"msg": "You don't own this product, therefore you cannot delete it!"}, 400
|
||||
UNKNOWN_PRODUCT = {"msg": "The product you tried fetching is not known. Try a different product ID."}, 400
|
||||
|
||||
SCROLLED_TOO_FAR = {"msg": "You scrolled too far in the pages. Try going back a little again."}, 400
|
||||
@@ -0,0 +1,26 @@
|
||||
USER_CREATED_SUCCESSFULLY = {"msg": "User created successfully."}, 201
|
||||
USER_LOGGED_OUT_SUCCESSFULLY = {"msg": "Successfully logged out"}, 200
|
||||
USER_DELETED_SUCCESSFULLY = {"msg": "User successfully deleted"}, 200
|
||||
|
||||
|
||||
def USER_ACCOUNT_UPDATED_SUCCESSFULLY(updated_attributes):
|
||||
return {"msg": f"Successfully updated your accounts {', '.join(updated_attributes)}"}, 200
|
||||
|
||||
INVALID_USERNAME_FORMAT = {
|
||||
"msg": "Username is in incorrect format. It must be between 1 and 64 lowercase characters."
|
||||
}, 400
|
||||
INVALID_DISPLAYNAME_FORMAT = {
|
||||
"msg": "Display name is in incorrect format. It must contain only letters, '.', '-', or '_' and be between 1 and 64 characters."
|
||||
}, 400
|
||||
INVALID_EMAIL_FORMAT = {"msg": "Email is in incorrect format."}, 400
|
||||
INVALID_PASSWORD_FORMAT = {
|
||||
"msg": "Password is in incorrect format. It must be between 8 and 64 characters and contain at least one uppercase letter, one lowercase letter, one digit, and one special character"
|
||||
}, 400
|
||||
|
||||
EMAIL_ALREADY_IN_USE = {"msg": "Email already in use."}, 409
|
||||
USERNAME_ALREADY_IN_USE = {"msg": "Username already in use."}, 409
|
||||
|
||||
USERNAME_NOT_FOUND = {"msg": "Username not found"}, 400
|
||||
INCORRECT_PASSWORD = {"msg": "Incorrect password"}, 401
|
||||
|
||||
UNKNOWN_ERROR = {"msg": "An unknown error occurred with user"}, 500
|
||||
Reference in new issue
Block a user