-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(server): Add user login endpoint
Added a new endpoint for user login in the server.py file. The login endpoint allows users to log in and returns the result. If any error occurs during the login process, an exception is logged and a 500 status code is returned. The new endpoint is defined as a POST request at `/user/login`. The request body expects a `Login` object.
- Loading branch information
Showing
6 changed files
with
421 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# -*- coding: utf-8 -*- | ||
# @Time : 2024/2/7 下午12:51 | ||
# @Author : sudoskys | ||
# @File : random_prompt.py | ||
# @Software: PyCharm | ||
import random | ||
|
||
from novelai_python.utils.random_prompt import RandomPromptGenerator | ||
|
||
|
||
print(random.random()) | ||
s = RandomPromptGenerator(nsfw_enabled=True).generate() | ||
print(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.