mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-12 12:03:06 +08:00
536: Add endpoint to resolve frontend user by auth method and username (#539)
* Add endpoint to resolve frontend user by auth method and username * Require client ID for frontend user lookup * Remove unnecessary if check * Fix PromptRepository -> UserRepository * Convert to protocol User * Move User prep * Address review comments * 404 -> HTTP_404_NOT_FOUND
This commit is contained in:
@@ -9,7 +9,7 @@ class OasstErrorCode(IntEnum):
|
||||
Ranges:
|
||||
0-1000: general errors
|
||||
1000-2000: tasks endpoint
|
||||
2000-3000: prompt_repository
|
||||
2000-3000: prompt_repository, task_repository, user_repository
|
||||
3000-4000: external resources
|
||||
"""
|
||||
|
||||
@@ -45,6 +45,7 @@ class OasstErrorCode(IntEnum):
|
||||
TASK_NOT_ACK = 2104
|
||||
TASK_ALREADY_DONE = 2105
|
||||
TASK_NOT_COLLECTIVE = 2106
|
||||
USER_NOT_FOUND = 2200
|
||||
|
||||
# 3000-4000: external resources
|
||||
HUGGINGFACE_API_ERROR = 3001
|
||||
|
||||
Reference in New Issue
Block a user