-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from mathieuher/preview/verification
Preview/verification
- Loading branch information
Showing
19 changed files
with
654 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
122
backend/pb_migrations/1736040841_updated_public_events.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) |
Oops, something went wrong.