mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-20 01:50:24 -05:00
use application/json for login and logout
This commit is contained in:
@@ -168,10 +168,11 @@ export default class MoonfireAPI {
|
||||
*/
|
||||
login(username, password) {
|
||||
return $.ajax(this._builder.makeUrl('login'), {
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
username: username,
|
||||
password: password,
|
||||
},
|
||||
}),
|
||||
contentType: 'application/json',
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
@@ -185,9 +186,10 @@ export default class MoonfireAPI {
|
||||
*/
|
||||
logout(csrf) {
|
||||
return $.ajax(this._builder.makeUrl('logout'), {
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
csrf: csrf,
|
||||
},
|
||||
}),
|
||||
contentType: 'application/json',
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user