Actually use the loginUser arguments in the example (#7714)

This commit is contained in:
Romain Rigaux 2021-03-09 04:00:51 -08:00 committed by GitHub
parent 4e0d6c4118
commit 750bad0a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -453,7 +453,7 @@ For example, using the "Django REST framework JWT" package
function loginUser(username, password) {
let action = ["api-token-auth", "obtain-token"];
let params = {username: "example", email: "example@example.com"};
let params = {username: username, password: password};
client.action(schema, action, params).then(function(result) {
// On success, instantiate an authenticated client.
let auth = window.coreapi.auth.TokenAuthentication({