-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added team endpoint and infrastructure * added dockerfile * fixed issue with null * updated player discord id to reflect what they actually are * save pt * added exception handling to better manage status codes and refactored * added more features and much better exception handling. * updated request contract and added ability to delete teams * starting league endpoint stuff * save point for completing GET All, POST Create League, PUT edit league name. Added changelog stuff to liquibase, made more exceptions. * made changes to handle league CRUD (PUT/DELETE/GET ONE) and edited player resource to enable league stuff * updated db raid table to have a status column. * save pt * made fk to league from raid table and implemented POST * added delete endpoint * finished boss endpoint * finished assignment endpoint * added league id to raid response and endpoint to search raid by leagueName * rewrote entire api to follow what's mentioned in #19 * rewrote entire api to follow what's mentioned in #19 * updated logic and added tier to payload * added ability to update boss health * fixed boss logging issue and finished endpoints * added templates * fixed #28 * added security for all paths non h2, configured docker compose and productionized settings * save pt * added gradle clean and fixed jdbc url * fixed enum, dc file, and added logging level thresholds
- Loading branch information
Showing
43 changed files
with
707 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,6 @@ out/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
#secrets | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM gradle:5.6.4-jdk11 AS build | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY --chown=gradle:gradle . /app | ||
|
||
RUN gradle clean build --no-daemon | ||
|
||
FROM openjdk:11-jre-slim | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY --from=build /app/build/libs/*jar /app/app.jar | ||
|
||
ENTRYPOINT ["java", "-jar", "app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: "3.7" | ||
services: | ||
super-pal-api: | ||
build: . | ||
ports: | ||
- "8080:8080" | ||
env_file: | ||
- .env | ||
depends_on: | ||
- db | ||
links: | ||
- db | ||
db: | ||
image: postgres:12-alpine | ||
environment: | ||
POSTGRES_PASSWORD: ${DB_PW} | ||
POSTGRES_USER: ${DB_USER} | ||
POSTGRES_DB: super_pal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
src/main/java/com/seekheart/superpalapi/model/domain/League.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/main/java/com/seekheart/superpalapi/model/domain/Player.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/main/java/com/seekheart/superpalapi/model/domain/PlayerTeam.java
This file was deleted.
Oops, something went wrong.
14 changes: 11 additions & 3 deletions
14
src/main/java/com/seekheart/superpalapi/model/domain/Raid.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
package com.seekheart.superpalapi.model.domain; | ||
|
||
import com.seekheart.superpalapi.model.util.RaidStatusOptions; | ||
import java.util.UUID; | ||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.EnumType; | ||
import javax.persistence.Enumerated; | ||
import javax.persistence.Id; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
@Builder | ||
public class Raid { | ||
|
||
@Id | ||
private UUID id; | ||
private Long rank; | ||
@Column | ||
private Long tier; | ||
@Enumerated(EnumType.STRING) | ||
@Column | ||
private RaidStatusOptions state; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
src/main/java/com/seekheart/superpalapi/model/domain/Team.java
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/main/java/com/seekheart/superpalapi/model/error/BadRaidRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.seekheart.superpalapi.model.error; | ||
|
||
public class BadRaidRequest extends RuntimeException { | ||
|
||
public BadRaidRequest() { | ||
super("Cannot have raid tier lower than 2 or greater than 8!"); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/seekheart/superpalapi/model/error/BossNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.seekheart.superpalapi.model.error; | ||
|
||
import java.util.UUID; | ||
|
||
public class BossNotFoundException extends RuntimeException { | ||
|
||
public BossNotFoundException(UUID id) { | ||
super("Boss id=" + id + " does not exist!"); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/seekheart/superpalapi/model/error/NoActiveRaidException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.seekheart.superpalapi.model.error; | ||
|
||
import java.util.UUID; | ||
|
||
public class NoActiveRaidException extends RuntimeException { | ||
|
||
public NoActiveRaidException(UUID uuid) { | ||
super("No active raid present for id=" + uuid); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/seekheart/superpalapi/model/error/RaidAlreadyActiveException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.seekheart.superpalapi.model.error; | ||
|
||
public class RaidAlreadyActiveException extends RuntimeException { | ||
|
||
public RaidAlreadyActiveException() { | ||
super("Only 1 active raid is allowed!"); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/seekheart/superpalapi/model/error/RaidBossNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.seekheart.superpalapi.model.error; | ||
|
||
import java.util.UUID; | ||
|
||
public class RaidBossNotFoundException extends RuntimeException { | ||
|
||
public RaidBossNotFoundException(UUID id) { | ||
super("RaidBoss not found for raid=" + id); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/seekheart/superpalapi/model/error/RaidNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.seekheart.superpalapi.model.error; | ||
|
||
import java.util.UUID; | ||
|
||
public class RaidNotFoundException extends RuntimeException { | ||
|
||
public RaidNotFoundException(UUID id) { | ||
super("Raid not found for id=" + id); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/seekheart/superpalapi/model/util/RaidStatusOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.seekheart.superpalapi.model.util; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum RaidStatusOptions { | ||
FUNDING("funding"), IN_PROGRESS("in progress"), ENDED("ended"); | ||
private final String value; | ||
|
||
RaidStatusOptions(String value) { | ||
this.value = value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.