before merge

This commit is contained in:
qyzh 2020-07-15 10:55:13 +08:00
parent a8c7fdb169
commit e07dddde98
3 changed files with 25 additions and 4 deletions

View File

@ -342,7 +342,9 @@ class ApplicationController < ActionController::Base
elsif params[:debug] == 'student' elsif params[:debug] == 'student'
User.current = User.find 8686 User.current = User.find 8686
elsif params[:debug] == 'admin' elsif params[:debug] == 'admin'
User.current = User.find 1 user = User.find 1
User.current = user
cookies.signed[:user_id] = user.id
end end
end end
# User.current = User.find 81403 # User.current = User.find 81403
@ -386,7 +388,6 @@ class ApplicationController < ActionController::Base
else else
User.current User.current
end end
# User.current
end end
## 默认输出json ## 默认输出json
@ -794,4 +795,4 @@ class ApplicationController < ActionController::Base
HotSearchKeyword.add(keyword) HotSearchKeyword.add(keyword)
end end
end end

View File

@ -1,6 +1,6 @@
class SettingsController < ApplicationController class SettingsController < ApplicationController
def show def show
@old_projects_url = nil @old_projects_url = nil
@old_projects_url = "https://www.trustie.net/users/#{current_user.try(:login)}/projects" if User.current.logged? @old_projects_url = "https://www.trustie.net/users/#{current_user.try(:login)}/projects" if User.current.logged?
end end
end end

View File

@ -0,0 +1,20 @@
## 从命令行创建一个新的仓库
```bash
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin http://gitea.trustie.net/qiubing/gitea_binary_package.git
git push -u origin master
```
## 从命令行推送已经创建的仓库
```bash
git remote add origin http://gitea.trustie.net/qiubing/gitea_binary_package.git
git push -u origin master
```