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

chore(deps): bump golang.org/x/crypto from 0.0.0-20210921155107-089bfa567519 to 0.1.0 #6

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
820acbc
configs dir
xushuhui Oct 14, 2021
755ab2b
register no auth
xushuhui Oct 14, 2021
6d9c28c
增加book接口
LiYuanits Oct 15, 2021
f2a1346
feat: get book
LiYuanits Oct 15, 2021
45478b5
fix:route, get book
LiYuanits Oct 15, 2021
bdd8981
fix: changeMyPassword, timemixin
xushuhui Oct 18, 2021
ea85503
feat: zap logger middleware
xushuhui Oct 18, 2021
97b4a41
remove: zap logger middleware
xushuhui Oct 18, 2021
5927844
chore:log
xushuhui Oct 20, 2021
28109d4
fix :sql
xushuhui Oct 20, 2021
0f8c63d
fix: create_time,update_time
LiYuanits Oct 20, 2021
89a8f9d
fear: page struct
xushuhui Oct 20, 2021
b78f8dd
feat(biz,data/log):log
LiYuanits Oct 21, 2021
2561e8b
feat(biz,data/log):log
LiYuanits Oct 21, 2021
41bf9e3
fix: page, request validate tag
xushuhui Oct 21, 2021
d476aa1
fix: changemypassword getmyinfomation
xushuhui Oct 21, 2021
1dfe4be
feat: move ent model to model dir
xushuhui Oct 21, 2021
d1b82b9
.gitignore
1768177868 Oct 21, 2021
b27569b
Merge branch 'master' of github.com:xushuhui/lin-cms-go
1768177868 Oct 21, 2021
387ee5d
Dockerfile
1768177868 Oct 21, 2021
eb13016
.dockerignore
1768177868 Oct 22, 2021
cb10233
feat:log
LiYuanits Oct 22, 2021
924b49b
Merge remote-tracking branch 'origin/master'
LiYuanits Oct 22, 2021
98e18bd
refactor: searchlogs
xushuhui Oct 22, 2021
23876f3
refactor:log
LiYuanits Oct 25, 2021
d409748
docs, model
xushuhui Oct 26, 2021
36774b7
feat:group
LiYuanits Nov 1, 2021
fb5a2ae
perf:CreateGroup
LiYuanits Nov 3, 2021
5716be4
refactor:error handle
xushuhui Nov 4, 2021
59e15a4
fix: dispatch permissions
xushuhui Nov 8, 2021
49b5396
fix: delete lin_group_permission struct
xushuhui Nov 8, 2021
43c2581
feat: get all lin_permission
xushuhui Nov 8, 2021
b9fbf4c
feat:group
LiYuanits Nov 8, 2021
d74a2b8
fix: delete group
xushuhui Nov 8, 2021
6d10490
feat : userlog middleware
xushuhui Nov 9, 2021
ee61343
refactor move core/utils
xushuhui Nov 11, 2021
7fe1e4f
middleware error
xushuhui Nov 11, 2021
bba5ff2
feat : permission
xushuhui Nov 15, 2021
94a0ace
feat: delete user
xushuhui Nov 15, 2021
66d3383
feat : updateUser,getUsers
xushuhui Nov 16, 2021
0cd4390
fix: permission
xushuhui Nov 16, 2021
d91925d
fix: permission
xushuhui Nov 16, 2021
3402472
refactor: error
xushuhui Nov 17, 2021
8d06c53
refactor: error wrap
xushuhui Nov 23, 2021
545203c
fix; doc
xushuhui Sep 20, 2022
4d71d19
chore(deps): bump golang.org/x/crypto
dependabot[bot] Mar 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: changeMyPassword, timemixin
feat: custom ent template
  • Loading branch information
xushuhui committed Oct 18, 2021
commit bdd8981247d900f619ebf2da05b800fefdfdd8ef
5 changes: 2 additions & 3 deletions api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ func ChangeMyPassword(c *fiber.Ctx) error {
if err := core.ParseRequest(c, &req); err != nil {
return err
}
user := biz.LocalUser(c)

var uid int

err := biz.ChangeMyPassword(c.Context(), req, uid)
err := biz.ChangeMyPassword(c.Context(), req, user.ID)
if err != nil {

return err
Expand Down
6 changes: 1 addition & 5 deletions internal/biz/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package biz

import (
"lin-cms-go/internal/request"
"lin-cms-go/pkg/core"
)

func GetUsers(req request.GetUsers) (data map[string]interface{}, err error) {
Expand All @@ -27,10 +26,7 @@ func ChangeUserPassword(req request.ChangeUserPassword) (err error) {
return
}
func DeleteUser(id int) (err error) {
if id <= 0 {
err = core.NewInvalidParamsError("id cannot be negative")
return
}

return
}
func UpdateUser(req request.UpdateUser) (err error) {
Expand Down
2 changes: 1 addition & 1 deletion internal/data/ent/generate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package ent

//go:generate go run -mod=mod entgo.io/ent/cmd/ent generate ./schema
//go:generate go run -mod=mod entgo.io/ent/cmd/ent --template glob=./tmpl/*.tmpl generate ./schema
3 changes: 1 addition & 2 deletions internal/data/ent/schema/lin_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"entgo.io/ent/schema"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/mixin"
)

type LinUser struct {
Expand All @@ -20,7 +19,7 @@ func (LinUser) Annotations() []schema.Annotation {
}
func (LinUser) Mixin() []ent.Mixin {
return []ent.Mixin{
mixin.Time{},
TimeMixin{},
}
}
func (LinUser) Fields() []ent.Field {
Expand Down
18 changes: 3 additions & 15 deletions internal/data/ent/schema/lin_user_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"

"entgo.io/ent/schema/mixin"
"time"
)
Expand All @@ -21,20 +22,7 @@ func (TimeMixin) Fields() []ent.Field {
field.Time("updated_time").
Default(time.Now).
UpdateDefault(time.Now),
field.Time("delete_time").
Default(nil),
}
}

//type LinUserGroup struct {
// ent.Schema
//}
//func (LinUserGroup) Annotations() []schema.Annotation {
// return []schema.Annotation{
// entsql.Annotation{Table: "lin_user_group"},
// }
//}
//func (LinUserGroup) Fields() []ent.Field {
// return []ent.Field{
// field.Int("user_id").Comment("用户id").Unique(),
// field.Int("group_id").Comment("分组id"),
// }
//}
Loading