mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-14 10:08:15 +02:00
[#38] added lint and used the lint suggestions
This commit is contained in:
1 parent
dfd9528847
commit
d64fbf9011
36 files changed
+110
-65
No files matched your search
+8
-6
@@ -163,11 +163,12 @@ func (api *realtimeApi) bindEvents() {
|
||||
modelTable := data.Model.TableName()
|
||||
|
||||
var contextKey string
|
||||
if modelTable == userTable {
|
||||
switch modelTable {
|
||||
case userTable:
|
||||
contextKey = ContextUserKey
|
||||
} else if modelTable == adminTable {
|
||||
case adminTable:
|
||||
contextKey = ContextAdminKey
|
||||
} else {
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -186,11 +187,12 @@ func (api *realtimeApi) bindEvents() {
|
||||
modelTable := data.Model.TableName()
|
||||
|
||||
var contextKey string
|
||||
if modelTable == userTable {
|
||||
switch modelTable {
|
||||
case userTable:
|
||||
contextKey = ContextUserKey
|
||||
} else if modelTable == adminTable {
|
||||
case adminTable:
|
||||
contextKey = ContextAdminKey
|
||||
} else {
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user