refactoring and checkpoint
This commit is contained in:
@@ -1,6 +1,31 @@
|
||||
class Urls {
|
||||
static const String baseUrl = 'http://192.168.1.145:8085';
|
||||
// static const String login = baseUrl + 'auth/login';
|
||||
static const String eventsUrl = '$baseUrl/events';
|
||||
// Ajoute d'autres URLs ici
|
||||
|
||||
// Authentication and Users Endpoints
|
||||
static const String authenticateUser = '$baseUrl/users/authenticate';
|
||||
static const String createUser = '$baseUrl/users';
|
||||
static const String getUserById = '$baseUrl/users'; // Append '/{id}' dynamically
|
||||
static const String deleteUser = '$baseUrl/users'; // Append '/{id}' dynamically
|
||||
static const String updateUserProfileImage = '$baseUrl/users'; // Append '/{id}/profile-image' dynamically
|
||||
|
||||
// Events Endpoints
|
||||
static const String createEvent = '$baseUrl/events';
|
||||
static const String getEventById = '$baseUrl/events'; // Append '/{id}' dynamically
|
||||
static const String deleteEvent = '$baseUrl/events'; // Append '/{id}' dynamically
|
||||
static const String getEventsAfterDate = '$baseUrl/events/after-date';
|
||||
static const String addParticipant = '$baseUrl/events'; // Append '/{id}/participants' dynamically
|
||||
static const String removeParticipant = '$baseUrl/events'; // Append '/{id}/participants/{userId}' dynamically
|
||||
static const String getNumberOfParticipants = '$baseUrl/events'; // Append '/{id}/participants/count' dynamically
|
||||
static const String closeEvent = '$baseUrl/events'; // Append '/{id}/close' dynamically
|
||||
static const String updateEvent = '$baseUrl/events'; // Append '/{id}' dynamically
|
||||
static const String updateEventImage = '$baseUrl/events'; // Append '/{id}/image' dynamically
|
||||
static const String getAllEvents = '$baseUrl/events';
|
||||
static const String getEventsByCategory = '$baseUrl/events/category'; // Append '/{category}' dynamically
|
||||
static const String updateEventStatus = '$baseUrl/events'; // Append '/{id}/status' dynamically
|
||||
static const String searchEvents = '$baseUrl/events/search'; // Use query parameter for 'keyword'
|
||||
static const String getEventsByUser = '$baseUrl/events/user'; // Append '/{userId}' dynamically
|
||||
static const String getEventsByStatus = '$baseUrl/events/status'; // Append '/{status}' dynamically
|
||||
static const String getEventsBetweenDates = '$baseUrl/events/between-dates'; // Use query parameters for startDate and endDate
|
||||
|
||||
// Other URLs can be added here as the project expands
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user