Compare commits
2 Commits
4c31ccd021
...
v.0.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7dc392631d | |||
| 98f8e0b79b |
27
CHANGELOG.md
27
CHANGELOG.md
@@ -1,3 +1,30 @@
|
|||||||
|
# v.0.3.0 (Release Candidate 1)
|
||||||
|
## 🚀 Features
|
||||||
|
- Swagger Documentation
|
||||||
|
|
||||||
|
## 🐛 Bugfixes
|
||||||
|
- Bugfix on search page for Band datasets
|
||||||
|
|
||||||
|
# v.0.2.0 (Beta)
|
||||||
|
## 🚀 Features
|
||||||
|
- Adding "Test Environment" banner in the bottom right corner
|
||||||
|
- License handling system
|
||||||
|
- New SQL-Injection exercise 2.1
|
||||||
|
- Solution code based on Matrikelnummer and number of completed exercises
|
||||||
|
|
||||||
|
## 🌟 Enhancements
|
||||||
|
- Improve exercise solution of 2.1, 2.2, 2.3, 2.4 and 2.6
|
||||||
|
- Light mode improvements
|
||||||
|
- Global color schema
|
||||||
|
- More feedback through notifications
|
||||||
|
- More hints on text fields
|
||||||
|
- Redesign account pages, split payments and addresses, new dashboard
|
||||||
|
|
||||||
|
## 🐛 Bugfixes
|
||||||
|
- More server stability
|
||||||
|
- Bugfix file manager in Electron application
|
||||||
|
|
||||||
|
|
||||||
# v.0.1.0 (Alpha)
|
# v.0.1.0 (Alpha)
|
||||||
## 🚀 Features
|
## 🚀 Features
|
||||||
- Frontend
|
- Frontend
|
||||||
|
|||||||
423
README.md
423
README.md
@@ -1,6 +1,6 @@
|
|||||||
# EventMaster
|
# EventMaster
|
||||||
|
|
||||||
The most hackable Web Shop!
|
The most hackable Ticket-Shop!
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
@@ -47,424 +47,3 @@ The frontend runs on `http://localhost:5173/` and the backend on `http://localho
|
|||||||
|
|
||||||
### Database
|
### Database
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
### Backend API endpoints
|
|
||||||
|
|
||||||
The application host it's data in a SQLite database. The access is managed by an [ExpressJs](https://expressjs.com/) server which offers many REST-API endpoints for the frontend. The REST-API server runs on port 3000.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Listing existing
|
|
||||||
|
|
||||||
<details open>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/accounts/</b></code> <code> (Get all Accounts)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<Account + AccountRole>` |
|
|
||||||
|
|
||||||
##### Example Response
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"id": 421,
|
|
||||||
"username": "hagemeister93",
|
|
||||||
"password": "Xjt3qb5t",
|
|
||||||
"email": "hagemeister93@gmail.com",
|
|
||||||
"firstName": "Laurin",
|
|
||||||
"lastName": "Hagemeister",
|
|
||||||
"accountRoleId": 2,
|
|
||||||
"accountRole": {
|
|
||||||
"id": 2,
|
|
||||||
"name": "Admin",
|
|
||||||
"privilegeBuy": true,
|
|
||||||
"privilegeAdminPanel": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details open>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/api/files</b></code> <code> (Get all public files)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<{folder: String, files: Array<{name: String, size: Number, url: String}> }>` |
|
|
||||||
|
|
||||||
##### Example Response
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"folder": "artists",
|
|
||||||
"files": [
|
|
||||||
{
|
|
||||||
"name": "alex-turner.jpg",
|
|
||||||
"size": 56473,
|
|
||||||
"url": "http://localhost:3000/static/artists/alex-turner.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "andy-nicholson.jpg",
|
|
||||||
"size": 68983,
|
|
||||||
"url": "http://localhost:3000/static/artists/andy-nicholson.jpg"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details open>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/bands/</b></code> <code> (Get all bands)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | `sort` | optional | string | Sort by number of concerts ascending (asc) or descending (desc) |
|
|
||||||
> | `count` | optional | number | Number of items to responde |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<>` |
|
|
||||||
|
|
||||||
##### Example Response
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"folder": "artists",
|
|
||||||
"files": [
|
|
||||||
{
|
|
||||||
"name": "alex-turner.jpg",
|
|
||||||
"size": 56473,
|
|
||||||
"url": "http://localhost:3000/static/artists/alex-turner.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "andy-nicholson.jpg",
|
|
||||||
"size": 68983,
|
|
||||||
"url": "http://localhost:3000/static/artists/andy-nicholson.jpg"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/events?city=cityName&genre=genreName&count=nrOfItems&sort=sortDirection</b></code> <code> (Get all events, filtered by city and genre)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | `cityName` | optional | string | Name of the city to filter for |
|
|
||||||
> | `genreName` | optional | string | Name of the genre to filter for |
|
|
||||||
> | `nrOfItems` | optional | number | Limits number of results |
|
|
||||||
> | `sortDirection` | optional | string | Sort by number of concerts, 'asc' or 'desc' |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<Event + Array<Concert + Location + City> + Band & Genre>` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/locations?count=nrOfItems&sort=sortDirection</b></code> <code> (Get all locations)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | `nrOfItems` | optional | number | Limits number of results |
|
|
||||||
> | `sortDirection` | optional | string | Sort by number of concerts, 'asc' or 'desc' |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<Location + City + Array<Concert + Event>>` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
Down here: todo!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/bands</b></code> <code> (Get all bands)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<Band>` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/bands/:id</b></code> <code> (Get all information about one band)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | `id` | required | string | ID of product in the database |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Band` + `Array<Rating>` + `Array<Member>` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/shows/:id</b></code> <code> (Get all information about one show)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | `id` | required | string | ID of product in the database |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Show` + `Tour` + `Location` + `City` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/tours</b></code> <code> (Get all tours)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<Tours>` + `Band` + `Show` + `Location` + `City` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/genres</b></code> <code> (Get all genres)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<Genre>` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/orders/:id</b></code> <code> (Get all orders of an user)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | --- | --- | --- | --- |
|
|
||||||
> | `id` | required | string | ID of userAccount in the database |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `ProductModel` + `Order`, `OrderItem`, `Product` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/categories/</b></code> <code> (Get all Categories)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<Categories>` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/brands</b></code> <code> (Get all Brands)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `Array<Brand>` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
#### Creating new
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#69CA92"><b>POST</b></span></code> <code><b>/accounts/</b></code> <code> (Create a new account)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | None | required | object (JSON) | Model of an Account |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `201` | `application/json` | `AccountModel` |
|
|
||||||
> | `400` | `application/json` | `{code: 400, message: "Username too short!"}` |
|
|
||||||
> | `400` | `application/json` | `{code: 400, message: "Password too short!"}` |
|
|
||||||
> | `409` | `application/json` | `{code: 409, message: "Username already in use"}` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#69CA92"><b>POST</b></span></code> <code><b>/orders/</b></code> <code> (Create a new order)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | None | required | object (JSON) | Model of an Order |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `201` | `application/json` | `OrderModel` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Updating existing
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#F3A63D"><b>PATCH</b></span></code> <code><b>/accounts/</b></code> <code> (Update data of an existing account)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | None | required | object (JSON) | Model of an Account |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | AccountModel |
|
|
||||||
> | `400` | `application/json` | `{code: 400, message: "..."}` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Delete existing
|
|
||||||
|
|
||||||
<!-- <details>
|
|
||||||
<summary><code><span style="color:#EB5246"><b>DELETE</b></span></code> <code><b>/product/:id</b></code> <code> (Delete a product)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | :---: | --- | --- | --- |
|
|
||||||
> | `id` | required | string | ID of product in the database |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `ProductModel` |
|
|
||||||
> | `400` | `application/json` | `{code: 400, message: "..."}` |
|
|
||||||
</details> -->
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Miscs
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/api/</b></code> <code> (Check if server runs)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | None | None |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#70AFFD"><b>GET</b></span></code> <code><b>/resetDatabase/</b></code> <code> (Reset the database to it's default values)</code>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> None
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | None | None |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
#### Validate
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><code><span style="color:#69CA92"><b>POST</b></span></code> <code><b>/accounts/login</b></code> <code> (Login for user)</code></summary>
|
|
||||||
|
|
||||||
##### Parameters
|
|
||||||
> | name | type | data type | description |
|
|
||||||
> | --- | --- | --- | --- |
|
|
||||||
> | username | required | string | Username of the account |
|
|
||||||
> | password | required | string | Password of the account |
|
|
||||||
|
|
||||||
##### Responses
|
|
||||||
> | http code | content-type | response |
|
|
||||||
> | :---: | --- | --- |
|
|
||||||
> | `200` | `application/json` | `AccountObject` + `Addresses`, `Payments`, `AccountRole` |
|
|
||||||
> | `400` | `application/json` | `{code: 400, message: "Bad Request"}` |
|
|
||||||
> | `401` | `application/json` | `{code: 401, message: "Unauthorized"}` |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
---
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eventmaster",
|
"name": "eventmaster",
|
||||||
"version": "0.2.0",
|
"version": "0.3.0",
|
||||||
"author": "Tobias Zoghaib",
|
"author": "Tobias Zoghaib",
|
||||||
"description": "Hackable ticket store for educational purposes",
|
"description": "Hackable ticket store for educational purposes",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -95,13 +95,5 @@ export const useConcertStore = defineStore("concertStore", {
|
|||||||
this.concert = new ConcertDetailsApiModel()
|
this.concert = new ConcertDetailsApiModel()
|
||||||
this.showEditDialog = true
|
this.showEditDialog = true
|
||||||
},
|
},
|
||||||
|
|
||||||
editConcert(concert: ConcertModel) {
|
|
||||||
// todo
|
|
||||||
},
|
|
||||||
|
|
||||||
async deleteConcert(item: ConcertModel) {
|
|
||||||
// todo
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user