-
Notifications
You must be signed in to change notification settings - Fork 0
完成了后端登录、注册API(含cookie),完成了单元测试 #11
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
base: main
Are you sure you want to change the base?
Conversation
TRM-coding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 登录和注册的返回接口不对
- Authentication.py写错了,不能这么构建架构:
应该像之前一样,数据表单独列出来,然后封装最底层的数据插入操作,再封装上层的业务函数
具体步骤:
a.把表定义拆到models中
b.把基本的表增删查改操作加到Repositorys中
c.把业务逻辑(鉴权)加到services中(Login函数) - api应该封装在user_api.py中
TRM-coding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 完善接口说明
- user_task缺一个根据token鉴权的功能
TRM-coding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
鉴权做在API层
This reverts commit 26c01bb.
修复了machine部分的不合理网络请求方法。
|
完成了Machine、Container部分的后端API编写。 |
完成了后端登录、注册API的书写;
完成了后端cookies初步构建;
完成了登录、注册API单元测试。
+-----------------+
| Tables_in_fuxi |
+-----------------+
| authentications |
| containers |
| machines |
| user_container |
| users |
+-----------------+
mysql> DESCRIBE authentications;
+------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| token | varchar(255) | NO | PRI | NULL | |
| expires_at | datetime | NO | | NULL | |
+------------+--------------+------+-----+---------+-------+