mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
working on api
This commit is contained in:
parent
d577a34675
commit
c3066c824f
@ -30,7 +30,8 @@ class AccountApiController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) {
|
if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) {
|
||||||
return $this->accountRepo->createToken($request->token_name);
|
return $this->processLogin($request);
|
||||||
|
//return $this->accountRepo->createToken($request->token_name);
|
||||||
} else {
|
} else {
|
||||||
return 'Invalid credentials';
|
return 'Invalid credentials';
|
||||||
}
|
}
|
||||||
@ -50,4 +51,11 @@ class AccountApiController extends Controller
|
|||||||
|
|
||||||
return Response::make($response, 200, $headers);
|
return Response::make($response, 200, $headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function processLogin(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -470,6 +470,6 @@ class AccountRepository
|
|||||||
$token->token = str_random(RANDOM_KEY_LENGTH);
|
$token->token = str_random(RANDOM_KEY_LENGTH);
|
||||||
$token->save();
|
$token->save();
|
||||||
|
|
||||||
return $token->token;
|
return $token;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user