DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

ref: dc1f6cdd18c5527fb0e598cbeb4d899941a16918 deck-builder/api/src/actions/user/login.rs -rw-r--r-- 452 bytes
dc1f6cddJonni Liljamo feat(shared): new error UserPasswordCheckFailed 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * This file is part of laurelin/api
 * Copyright (C) 2023 Jonni Liljamo <jonni@liljamo.com>
 *
 * Licensed under GPL-3.0-only.
 * See LICENSE for licensing information.
 */

use diesel::PgConnection;
use laurelin_shared::error::api::APIError;

use crate::models::{User, UserCredentials};

pub(crate) fn login(
    conn: &mut PgConnection,
    credentials: &UserCredentials,
) -> Result<User, APIError> {
    Err(APIError::UserInvalidCredentials)
}