Browse Source

chore: 清除缓存

dev
1549469775 3 years ago
parent
commit
db15d0f6fb
  1. 1
      .gitignore
  2. 121549
      log/SQL.log
  3. 3
      log/Site.log
  4. 10
      source/route/api/v1/user/index.ts
  5. 42
      template/views/login.pug

1
.gitignore

@ -1,3 +1,4 @@
.vscode .vscode
.idea .idea
node_modules node_modules
log

121549
log/SQL.log

File diff suppressed because it is too large

3
log/Site.log

@ -1,3 +0,0 @@
[2022-02-24T14:57:07.335] [DEBUG] Site - 服务器启动
[2022-02-24T14:57:23.685] [DEBUG] Site - 服务器启动
[2022-02-24T15:00:56.695] [DEBUG] Site - 服务器启动

10
source/route/api/v1/user/index.ts

@ -46,10 +46,7 @@ export default class {
} }
@validate({ @validate({
payload: Joi.object({ payload: UserSchema,
username: Joi.string().alphanum().min(6).max(35).required(),
password: Joi.string().pattern(new RegExp("^[a-zA-Z0-9]{3,30}$")),
}),
}) })
@auth(false) @auth(false)
@method("POST") @method("POST")
@ -90,11 +87,6 @@ export default class {
} }
@method("GET") @method("GET")
@validate({
headers: Joi.object({
test: Joi.number(),
}).unknown(), // 注意加上这个
})
@swagger("获取用户信息", "返回注册用户的信息", ["用户操作", "api"]) @swagger("获取用户信息", "返回注册用户的信息", ["用户操作", "api"])
async userinfo(request: Req, h: Res): ReturnValue { async userinfo(request: Req, h: Res): ReturnValue {
const { id } = request.auth.credentials; const { id } = request.auth.credentials;

42
template/views/login.pug

@ -4,11 +4,11 @@ block head
+css("css/page/login.css") +css("css/page/login.css")
block content block content
h2 Weekly Coding Challenge #1: Sign in/up Form h2 天蚕 / 地雀
.container#container .container#container
.form-container.sign-up-container .form-container.sign-up-container
form(action='#') form(action='#' onsubmit='return false')
h1 Create Account h1 创建账户
.social-container .social-container
a.social(href='#') a.social(href='#')
i.fab.fa-facebook-f i.fab.fa-facebook-f
@ -16,14 +16,14 @@ block content
i.fab.fa-google-plus-g i.fab.fa-google-plus-g
a.social(href='#') a.social(href='#')
i.fab.fa-linkedin-in i.fab.fa-linkedin-in
span or use your email for registration span 使用您的邮箱注册
input(type='text', placeholder='Name') input(type='text', placeholder='请输入用户名')
input(type='email', placeholder='Email') input(type='email', placeholder='请输入邮箱')
input(type='password', placeholder='Password') input(type='password', placeholder='请输入密码')
button Sign Up button(type='submit') 注册
.form-container.sign-in-container .form-container.sign-in-container
form(action='#') form(action='/login' method='post')
h1 Sign in h1 登录
.social-container .social-container
a.social(href='#') a.social(href='#')
i.fab.fa-facebook-f i.fab.fa-facebook-f
@ -31,21 +31,21 @@ block content
i.fab.fa-google-plus-g i.fab.fa-google-plus-g
a.social(href='#') a.social(href='#')
i.fab.fa-linkedin-in i.fab.fa-linkedin-in
span or use your account span 填写您的账户
input(type='email', placeholder='Email') input(type='text',name="username" , placeholder='请输入邮箱')
input(type='password', placeholder='Password') input(type='password',name="password" , placeholder='请输入密码')
a(href='#') Forgot your password? a(href='#') 忘记密码?
button Sign In button 登录
.overlay-container .overlay-container
.overlay .overlay
.overlay-panel.overlay-left .overlay-panel.overlay-left
h1 Welcome Back! h1 欢迎回来!
p To keep connected with us please login with your personal info p 填写您的账户,与我们保持亲密联系吧!
button.ghost#signIn Sign In button.ghost#signIn 登录
.overlay-panel.overlay-right .overlay-panel.overlay-right
h1 Hello, Friend! h1 你好朋友!
p Enter your personal details and start journey with us p 创建您的个人账户,随我们遨游于此吧!
button.ghost#signUp Sign Up button.ghost#signUp 注册
footer footer
p p
| Created with | Created with

Loading…
Cancel
Save