Compare commits

..

3 Commits

Author SHA1 Message Date
Maxi Quoß 69bb334b20 fix: make more buttons reactive, remove user create rule, close #800 2024-12-28 12:49:18 +01:00
Maxi Quoß 885b69ff03 fix: upper case 2024-12-28 12:44:44 +01:00
Maxi Quoß 27e6bf01d3 fix: apply migrations 2024-12-28 11:48:25 +01:00
5 changed files with 45 additions and 5 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
FROM alpine:3 as downloader
FROM alpine:3 AS downloader
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
+2 -2
View File
@@ -1,11 +1,11 @@
FROM node:alpine as node
FROM node:alpine AS node
WORKDIR /app
COPY frontend/ .
RUN npm i -g pnpm &&\
pnpm i &&\
pnpm run build
FROM golang:alpine as go
FROM golang:alpine AS go
WORKDIR /app
COPY backend/ .
COPY --from=node /app/build ./pb_public
@@ -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)
})
}
+1 -1
View File
@@ -12,7 +12,7 @@ import (
"github.com/pocketbase/pocketbase/plugins/migratecmd"
"github.com/seriousm4x/upsnap/cronjobs"
"github.com/seriousm4x/upsnap/logger"
// _ "github.com/seriousm4x/upsnap/migrations"
_ "github.com/seriousm4x/upsnap/migrations"
)
var App *pocketbase.PocketBase
@@ -30,7 +30,7 @@
export let device: Device;
let moreButtons = [
$: moreButtons = [
{
text: $LL.device.card_btn_more_edit(),
icon: faPen,