Skip to content

Commit 474b456

Browse files
Selflockinghsluoyz
andauthored
fix: fix broken links (#3)
* fix: fix broken links * Update adapter.go --------- Co-authored-by: hsluoyz <hsluoyz@qq.com>
1 parent af6ff50 commit 474b456

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adapter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ func (a *Adapter) AddPolicy(sec string, ptype string, rule []string) error {
597597
// RemovePolicy removes a policy rule from the storage.
598598
func (a *Adapter) RemovePolicy(sec string, ptype string, rule []string) error {
599599
line := a.savePolicyLine(ptype, rule)
600-
err := a.rawDelete(a.db, line) //can't use db.Delete as we're not using primary key http://jinzhu.me/gorm/crud.html#delete
600+
err := a.rawDelete(a.db, line) //can't use db.Delete as we're not using primary key https://gorm.io/docs/update.html
601601
return err
602602
}
603603

@@ -616,7 +616,7 @@ func (a *Adapter) RemovePolicies(sec string, ptype string, rules [][]string) err
616616
return a.db.Transaction(func(tx *gorm.DB) error {
617617
for _, rule := range rules {
618618
line := a.savePolicyLine(ptype, rule)
619-
if err := a.rawDelete(tx, line); err != nil { //can't use db.Delete as we're not using primary key http://jinzhu.me/gorm/crud.html#delete
619+
if err := a.rawDelete(tx, line); err != nil { //can't use db.Delete as we're not using primary key https://gorm.io/docs/update.html
620620
return err
621621
}
622622
}

0 commit comments

Comments
 (0)