1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Handlers Module
//!
//! This module contains all the HTTP handlers for the application.
//! It is organized into sub-modules for each major feature area.
use ;
use json;
/// Creates a standardized error response.
///
/// This function is used by handlers to return a consistent
/// JSON error format.
///
/// # Arguments
///
/// * `status` - The HTTP status code for the error.
/// * `message` - A descriptive error message.
///
/// # Returns
///
/// A `Response` object containing the JSON error payload.
/// Creates a standardized success response.
///
/// This function is used by handlers to return a consistent
/// JSON success format.
///
/// # Arguments
///
/// * `status` - The HTTP status code for the success response.
/// * `message` - A descriptive success message.
///
/// # Returns
///
/// A `Response` object containing the JSON success payload.