1
0
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:
David Bomba 2015-11-03 10:55:31 +11:00
parent d577a34675
commit c3066c824f
2 changed files with 10 additions and 2 deletions

View File

@ -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)
{
}
} }

View File

@ -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;
} }
} }