mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 01:26:53 +03:00
Actually use the loginUser arguments in the example (#7714)
This commit is contained in:
parent
4e0d6c4118
commit
750bad0a58
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue
Block a user