Skip to content
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

Add / modify user by template #692

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

ImMohammad20000
Copy link
Contributor

@ImMohammad20000 ImMohammad20000 commented Dec 11, 2023

now we can add or modify user by templates using POST /api/user/from_template and PUT /api/user/{username}

Copy link
Collaborator

@M03ED M03ED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this be approved because templates are useful when they come to dashboard, changes like this is good for when we can set different access for each admin

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

share.py its a file for making configs for users not creating new user

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't want to make routers too long
and i don't creat a user just create object

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add property here and make user in here at CreateUserFromTemplate class



@app.post("/api/user", tags=['User'], response_model=UserResponse)
def add_user(new_user: UserCreate,
def add_user(new_user: UserCreate | CreateUserFromTemplate,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its better to separate api requests

@@ -44,6 +44,7 @@ PyMySQL==1.0.3
pyOpenSSL==23.2.0
pyparsing==3.0.9
pypng==0.20220715.0
PySocks==1.7.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can't find where you use this new library

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i try to access telegram use socks and that needed this lib so i added

@iambabyninja
Copy link
Contributor

It's good PR, some users ask about this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants