Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
52 changes: 25 additions & 27 deletions .rest
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,31 @@ GET http://localhost:5001/api/user/Test
Content-Type: application/json

###

### 2. Create a New User (POST)
POST http://localhost:5001/api/user/create
Content-Type: application/json

{
"FirstName": "J",
"LastName": "Doe",
"Email": "john.doe@example.com",
"Password": "password123",
"RecurringDays": 7,
"Role": 3,
"Points": {
"AllTimePoints": 1000,
"PointAmount": 0,
"Items": []
}
}

### Get User Details
GET http://localhost:5001/api/user/fromToken
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJIZWxsby5kb2VAZXhhbXBsZS5jb20iLCJqdGkiOiI0ODc5MTAzNi0zOTE3LTQ4NDktYjJiOS0wMDM2ZDZiNDJkNzQiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjkwZTNlMzdiLTQ3OTQtNDYzOS1hODg2LTFjZmFlY2VmYWU4MCIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcm9sZSI6IkFkbWluIiwiZXhwIjoxNzM2NjA3NDM0LCJpc3MiOiJDYWxlbmRlcmZ5IiwiYXVkIjoiQ2FsZW5kZXJmeS1Vc2VycyJ9.L7555TMGpJugu44umJDUlUmO1U11mtCWDJeqHo3zEIU
###

### 3. Get All Users (GET)
GET http://localhost:5001/api/user/all
//Authorization: Bearer YOUR_ACCESS_TOKEN_HERE

###
PUT http://localhost:5001/api/user/me
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJIZWxsby5kb2VAZXhhbXBsZS5jb20iLCJqdGkiOiIyNDE0MDY5NS02MmM4LTQ3NmEtOWE4Ni0xMDk1ODJkNjdkODkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjkwZTNlMzdiLTQ3OTQtNDYzOS1hODg2LTFjZmFlY2VmYWU4MCIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcm9sZSI6IkFkbWluIiwiZXhwIjoxNzM2NjAxODIzLCJpc3MiOiJDYWxlbmRlcmZ5IiwiYXVkIjoiQ2FsZW5kZXJmeS1Vc2VycyJ9.8PX8uRslM8PnCI-Zbd1iHRC45g6JrUX4-jupl_GYQ7g
Content-Type: application/json

{
"firstname": "jaaaaaaassss",
"lastname": "Dossssssssssssssse",
"email": "johnieeee.doe@example.com",
"password": "newpassword"
}


### 4. Get User by ID (GET)
GET http://localhost:5001/api/user/{079b196b-ccb3-4654-8f07-53b251b8079d}
//Authorization: Bearer YOUR_ACCESS_TOKEN_HERE
GET http://localhost:5001/api/user/{49012e45-51cb-4dc4-a9bf-7dceddbe7fcf}
//Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJIZWxsby5kb2VAZXhhbXBsZS5jb20iLCJqdGkiOiJkOTcyYjYxOC1hYTdlLTRkNDctOWJhNS04OGFlYzRmM2ZjNGQiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjAwMzlhNGFmLTE3MmQtNDE1OC05MGE2LWJkYzNiZGUyNDJiZCIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcm9sZSI6IkFkbWluIiwiZXhwIjoxNzM2NDUyMjc0LCJpc3MiOiJDYWxlbmRlcmZ5IiwiYXVkIjoiQ2FsZW5kZXJmeS1Vc2VycyJ9.bXoXoBoe9h10MUauJgwvw6E7RIKjsvk7b_kNSGXuj7Y

Content-Type: application/json

Expand All @@ -56,7 +51,7 @@ Content-Type: application/json
###

### 6. Delete User by ID (DELETE)
DELETE http://localhost:5001/api/user/{1113d1a7-3ccc-4fc0-b329-f600e314b0e3}
DELETE http://localhost:5001/api/user/{16daad2f-098c-4f07-b0da-3716403b7162}
//Authorization: Bearer YOUR_ACCESS_TOKEN_HERE

//CHANGE READOUT, WORKS!
Expand All @@ -69,19 +64,22 @@ POST http://localhost:5001/api/auth/login
Content-Type: application/json

{
"Email": "john.doe@example.com",
"Email": "Hello.doe@example.com",
"Password": "password123"
}

###
###



### 8. Login with Wrong Password
POST http://localhost:5001/api/auth/login
Content-Type: application/json

{
"Email": "john.doe@example.com",
"Password": "password122"
"Email": "Hello.doe@example.com",
"Password": "passwordxass123"
}

###
Expand All @@ -92,14 +90,14 @@ Authorization: Bearer YOUR_ACCESS_TOKEN_HERE

###
### 1. Get User Points
GET http://localhost:5001/api/points/{e4f85926-770f-4b45-80a2-99d323ebeb52}
GET http://localhost:5001/api/points/{9DF14F27-31DA-4FB8-A5FE-501E442A14D0}
Content-Type: application/json

###

### 2. Add Points to User
### 2. Add Points to User
POST http://localhost:5001/api/points/{e4f85926-770f-4b45-80a2-99d323ebeb52}/add
POST http://localhost:5001/api/points/{9DF14F27-31DA-4FB8-A5FE-501E442A14D0}/add
Content-Type: application/json

100
Expand Down
7 changes: 7 additions & 0 deletions Start Application.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cd frontend\clientapp
start Install.bat

cd..
cd..

dotnet run watch
Binary file modified app.db
Binary file not shown.
Binary file modified app.db-shm
Binary file not shown.
Binary file modified app.db-wal
Binary file not shown.
Binary file modified bin/Debug/net8.0/Web-Development.dll
Binary file not shown.
Binary file modified bin/Debug/net8.0/Web-Development.exe
Binary file not shown.
Binary file modified bin/Debug/net8.0/Web-Development.pdb
Binary file not shown.
Loading