Skip to content

Commit

Permalink
fix: make more buttons reactive, remove user create rule, close #800
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousm4x committed Dec 28, 2024
1 parent 885b69f commit 69bb334
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions backend/migrations/1735385555_updated_users.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package migrations

import (
"encoding/json"

"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)

func init() {
m.Register(func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("27do0wbcuyfmbmx")
if err != nil {
return err
}

// update collection data
if err := json.Unmarshal([]byte(`{
"createRule": ""
}`), &collection); err != nil {
return err
}

return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("27do0wbcuyfmbmx")
if err != nil {
return err
}

// update collection data
if err := json.Unmarshal([]byte(`{
"createRule": "@request.body.password:isset = false"
}`), &collection); err != nil {
return err
}

return app.Save(collection)
})
}
2 changes: 1 addition & 1 deletion frontend/src/lib/components/DeviceCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
export let device: Device;
let moreButtons = [
$: moreButtons = [
{
text: $LL.device.card_btn_more_edit(),
icon: faPen,
Expand Down

0 comments on commit 69bb334

Please sign in to comment.