Files
dashboard-icons/web/backend/pb_migrations/1759312218_updated_users.js

35 lines
659 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
// update collection data
unmarshal({
"authAlert": {
"enabled": false
},
"passwordAuth": {
"identityFields": [
"username"
]
}
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("_pb_users_auth_")
// update collection data
unmarshal({
"authAlert": {
"enabled": true
},
"passwordAuth": {
"identityFields": [
"email"
]
}
}, collection)
return app.save(collection)
})