Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite39308d

Browse files
author
okan.cetin
committed
#000 okan fixes fetch error
1 parent33e83ad commite39308d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/app/actions/authActions.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ export class LoginRequest extends AsyncAction {
1111
super();
1212

1313
this.then(dispatch=>{
14-
fetch("https://www.google.com/search?q=${username}+${password}")
14+
fetch(`https://httpbin.org/get?username=${username}&password=${password}`)
15+
.then(x=>x.json())
16+
.then(data=>{
17+
dispatch(newLogin(data.args.username+"|"+data.args.password));
18+
});
1519
returnthis;
1620
});
1721
}

‎src/app/reducers/authReducer.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const authReducer = new ReducerBuilder<AuthState>()
1111
.init({})
1212

1313
.action(Login,(state,action)=>{
14-
consttoken="token";
14+
consttoken=action.token;
1515

1616
localStorage.setItem(action.getTokenKey(),token);
1717

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp