Skip to content

Commit ec228bd

Browse files
committedMay 23, 2021
Initialize Go module and vendor dependencies
1 parent b244cb0 commit ec228bd

File tree

195 files changed

+273614
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+273614
-32
lines changed
 

‎api/account.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414

1515
"github.com/gorilla/context"
1616
"github.com/gorilla/mux"
17-
"github.com/mxk/go-sqlite/sqlite3"
17+
"github.com/mattn/go-sqlite3"
1818

19-
"github.com/hjr265/cactus/data"
20-
"github.com/hjr265/cactus/hub"
19+
"github.com/FurqanSoftware/cactus/data"
20+
"github.com/FurqanSoftware/cactus/hub"
2121
)
2222

2323
func ServeAccountList(w http.ResponseWriter, r *http.Request) {
@@ -83,7 +83,7 @@ func CreateAccount(w http.ResponseWriter, r *http.Request) {
8383
acc.Level = body.Level
8484
acc.Name = body.Name
8585
err = acc.Put()
86-
if err, ok := err.(*sqlite3.Error); ok && err.Code() == sqlite3.CONSTRAINT_UNIQUE {
86+
if err, ok := err.(*sqlite3.Error); ok && err.ExtendedCode&sqlite3.ErrConstraintUnique > 0 {
8787
http.Error(w, "", http.StatusConflict)
8888
return
8989
}
@@ -137,7 +137,7 @@ func ImportAccounts(w http.ResponseWriter, r *http.Request) {
137137
}
138138

139139
err = acc.Put()
140-
if err, ok := err.(*sqlite3.Error); ok && err.Code() == sqlite3.CONSTRAINT_UNIQUE {
140+
if err, ok := err.(*sqlite3.Error); ok && err.ExtendedCode&sqlite3.ErrConstraintUnique > 0 {
141141
continue
142142
}
143143
catch(err)

‎api/activity.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/gorilla/context"
1111

12-
"github.com/hjr265/cactus/data"
12+
"github.com/FurqanSoftware/cactus/data"
1313
)
1414

1515
func ServeActivityList(w http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)
Please sign in to comment.