Skip to content

Commit

Permalink
Merge pull request #22 from mathieuher/preview/verification
Browse files Browse the repository at this point in the history
Preview/verification
  • Loading branch information
mathieuher authored Jan 5, 2025
2 parents 8f87215 + 8336120 commit a9c3033
Show file tree
Hide file tree
Showing 19 changed files with 654 additions and 25 deletions.
20 changes: 20 additions & 0 deletions backend/pb_migrations/1736037536_updated_users.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("_pb_users_auth_")

// update collection data
unmarshal({
"createRule": "@request.body.premium:isset = false && @request.body.verified:isset = false"
}, collection)

return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("_pb_users_auth_")

// update collection data
unmarshal({
"createRule": "@request.body.premium:isset = false"
}, collection)

return app.save(collection)
})
20 changes: 20 additions & 0 deletions backend/pb_migrations/1736040606_updated_events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1687431684")

// update collection data
unmarshal({
"viewRule": "@request.auth.id != \"\" && @request.auth.verified = true"
}, collection)

return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1687431684")

// update collection data
unmarshal({
"viewRule": "@request.auth.id != \"\""
}, collection)

return app.save(collection)
})
22 changes: 22 additions & 0 deletions backend/pb_migrations/1736040674_updated_ghosts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2379182763")

// update collection data
unmarshal({
"createRule": "@request.auth.id != '' && @request.auth.verified = true",
"listRule": "@request.auth.id != '' && @request.auth.verified = true && @request.query.track = track && (@request.query.event = \"undefined\" || @request.query.event = event)"
}, collection)

return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2379182763")

// update collection data
unmarshal({
"createRule": "@request.auth.id != ''",
"listRule": "@request.auth.id != '' && @request.query.track = track && (@request.query.event = \"undefined\" || @request.query.event = event)"
}, collection)

return app.save(collection)
})
20 changes: 20 additions & 0 deletions backend/pb_migrations/1736040727_updated_records.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_231614380")

// update collection data
unmarshal({
"listRule": "@request.auth.id != '' && @request.auth.verified = true && (@request.query.server = event.server || @request.query.event = event)"
}, collection)

return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_231614380")

// update collection data
unmarshal({
"listRule": "@request.auth.id != '' && (@request.query.server = event.server || @request.query.event = event)"
}, collection)

return app.save(collection)
})
20 changes: 20 additions & 0 deletions backend/pb_migrations/1736040770_updated_servers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3738798621")

// update collection data
unmarshal({
"viewRule": "@request.auth.id != \"\" && @request.auth.verified = true"
}, collection)

return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3738798621")

// update collection data
unmarshal({
"viewRule": "@request.auth.id != \"\""
}, collection)

return app.save(collection)
})
22 changes: 22 additions & 0 deletions backend/pb_migrations/1736040817_updated_tracks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_327047008")

// update collection data
unmarshal({
"createRule": "@request.auth.id != '' && @request.auth.verified = true && owner.id = @request.auth.id",
"viewRule": "@request.auth.id != '' && @request.auth.verified = true"
}, collection)

return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_327047008")

// update collection data
unmarshal({
"createRule": "@request.auth.id != '' && owner.id = @request.auth.id",
"viewRule": "@request.auth.id != ''"
}, collection)

return app.save(collection)
})
122 changes: 122 additions & 0 deletions backend/pb_migrations/1736040841_updated_public_events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_901890428")

// update collection data
unmarshal({
"listRule": "@request.auth.id != \"\" && @request.auth.verified = true && @request.query.server = server"
}, collection)

// remove field
collection.fields.removeById("_clone_QKDJ")

// remove field
collection.fields.removeById("_clone_93dA")

// remove field
collection.fields.removeById("_clone_mz7f")

// add field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "_clone_Sqfl",
"max": null,
"min": 0,
"name": "racesLimit",
"onlyInt": true,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))

// add field
collection.fields.addAt(2, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_3VmJ",
"max": 16,
"min": 3,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))

// add field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "_clone_vWIZ",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
}))

return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_901890428")

// update collection data
unmarshal({
"listRule": "@request.auth.id != \"\" && @request.query.server = server"
}, collection)

// add field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "_clone_QKDJ",
"max": null,
"min": 0,
"name": "racesLimit",
"onlyInt": true,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))

// add field
collection.fields.addAt(2, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_93dA",
"max": 16,
"min": 3,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))

// add field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "_clone_mz7f",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
}))

// remove field
collection.fields.removeById("_clone_Sqfl")

// remove field
collection.fields.removeById("_clone_3VmJ")

// remove field
collection.fields.removeById("_clone_vWIZ")

return app.save(collection)
})
Loading

0 comments on commit a9c3033

Please sign in to comment.