Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 5ed9692c

Přidáno uživatelem Schwobik před asi 2 roky(ů)

#re 10171
Demo of application login with redux, axios and nativeBase. Tested

Zobrazit rozdíly:

src/api/authservice.ts
1 1
import { axiosInstance } from "./api"
2 2

  
3
export const login = (username: string, password: string) => {
4
    axiosInstance.post(
3
export const loginRequest = async (username: string, password: string) => {
4
    return await axiosInstance.post(
5 5
        "/api/login",
6 6
        {
7 7
            username: username,
8 8
            password: password
9 9
        }
10
    ).then((response) => {
11
        console.log(response)
12
    })
10
    )
13 11
}

Také k dispozici: Unified diff