mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 06:39:57 +08:00
Remove sudo mode and add password confirmation when changing email address
closes #674
This commit is contained in:
@ -154,10 +154,13 @@ export default class Model {
|
||||
|
||||
this.pushData(data);
|
||||
|
||||
const request = {data};
|
||||
if (options.meta) request.meta = options.meta;
|
||||
|
||||
return app.request(Object.assign({
|
||||
method: this.exists ? 'PATCH' : 'POST',
|
||||
url: app.forum.attribute('apiUrl') + this.apiEndpoint(),
|
||||
data: {data}
|
||||
data: request
|
||||
}, options)).then(
|
||||
// If everything went well, we'll make sure the store knows that this
|
||||
// model exists now (if it didn't already), and we'll push the data that
|
||||
|
Reference in New Issue
Block a user