DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

ref: 2acaf16c7ac759eeef7d89403e78f188cd6adcc0 deck-builder/api/src/actions/user/login.rs -rw-r--r-- 452 bytes
2acaf16cJonni Liljamo docs: wip README.md changes 2 years 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)
}