Skip to content

Commit 134d9d5

Browse files
Merge pull request #239 from Houssien-Zeineddine/docker-and-pipeline
Docker and pipeline
2 parents 3f23576 + 291c9f8 commit 134d9d5

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,26 @@
183183
| Add Elections API (Admin Only) | Delete Elections API (Admin Only) | Get Elections API |
184184
| ------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------ |
185185
| ![Landing](./readme/postman%20apis/add%20elections.png) | ![fsdaf](./readme/postman%20apis/delete%20elections.png) | ![fsdaf](./readme/postman%20apis/get%20elections'.png) |
186+
187+
<br><br>
188+
189+
### To login to the system:
190+
191+
A default admin user is available with the credentials:
192+
193+
email: test@example.com
194+
195+
password: 123456
196+
197+
Admins have full control over the system. They can:
198+
199+
- Create and manage elections
200+
- Add candidate users
201+
- Start and stop elections at any time
202+
203+
Despite their administrative privileges, admins can also participate in voting like regular users.
204+
205+
Candidates can:
206+
207+
- Create and update their campaign profiles
208+
- Participate in elections as voters

client/src/Utils/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const capitalizeTitle = (str) => {
1212
.join(' ');
1313
};
1414

15-
const BASE_URL = "http://127.0.0.1:8000";
15+
const BASE_URL = "http://13.38.84.88:8000";
1616
export default function getProfilePictureUrl(path) {
1717
if (!path) return null;
1818
return `${BASE_URL}/storage/${path}`;

client/src/components/PrivateRoute/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import React, { useContext } from "react";
22
import { Navigate } from "react-router-dom";
33
import { AuthContext } from "../Context/AuthorizationContext";
4+
import Loading from "../Loading";
45

56
const PrivateRoute = ({ children }) => {
67
const { user, authLoading } = useContext(AuthContext);
78

8-
if (authLoading) return <div>Loading...</div>;
9+
if (authLoading) return <Loading />;
910

1011
return user ? children : <Navigate to="/login" replace />;
1112
};

0 commit comments

Comments
 (0)