upgrade to Spring Boot 4, add webauthn support, some cleanup
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.businesslogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.businesslogic;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.controller;
|
||||
|
||||
import java.time.Instant;
|
||||
@@ -82,7 +79,7 @@ public class InviteController extends BaseController {
|
||||
* @return the invite
|
||||
*/
|
||||
@GetMapping("/{code}")
|
||||
public Invite get(@PathVariable("code") String code) {
|
||||
public Invite get(@PathVariable String code) {
|
||||
Invite invite = inviteManager.getByCode(code);
|
||||
if (invite == null) {
|
||||
throw new EntityResponseStatusException(HttpStatus.NOT_ACCEPTABLE);
|
||||
@@ -113,7 +110,7 @@ public class InviteController extends BaseController {
|
||||
* @return the permissions
|
||||
*/
|
||||
@GetMapping("/{code}/permissions")
|
||||
public List<Permission> getPermissions(@PathVariable("code") String code) {
|
||||
public List<Permission> getPermissions(@PathVariable String code) {
|
||||
Invite invite = inviteManager.getByCode(code);
|
||||
if (invite == null) {
|
||||
throw new EntityResponseStatusException(HttpStatus.NOT_ACCEPTABLE);
|
||||
@@ -130,7 +127,7 @@ public class InviteController extends BaseController {
|
||||
* @return the quotas
|
||||
*/
|
||||
@GetMapping("/{code}/quotas")
|
||||
public List<Quota> getQuotas(@PathVariable("code") String code) {
|
||||
public List<Quota> getQuotas(@PathVariable String code) {
|
||||
Invite invite = inviteManager.getByCode(code);
|
||||
if (invite == null) {
|
||||
throw new EntityResponseStatusException(HttpStatus.NOT_ACCEPTABLE);
|
||||
@@ -290,7 +287,7 @@ public class InviteController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@GetMapping("/{quota}/others")
|
||||
public Page<Invite> getOtherInvites(@PathVariable("quota") String quota,
|
||||
public Page<Invite> getOtherInvites(@PathVariable String quota,
|
||||
@RequestParam("page") Optional<Integer> pageParameter,
|
||||
@RequestParam("size") Optional<Integer> sizeParameter,
|
||||
@RequestParam("search") Optional<String> searchParameter,
|
||||
@@ -324,7 +321,7 @@ public class InviteController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@PostMapping("/{quota}")
|
||||
public Invite createInvite(@PathVariable("quota") String quota, @RequestBody Invite inviteModel) {
|
||||
public Invite createInvite(@PathVariable String quota, @RequestBody Invite inviteModel) {
|
||||
InviteMapping inviteMapping = inviteMappingManager.get(quota);
|
||||
Quota inviteQuota = quotaManager.get(getCurrentUserId(), InviteMapping.QUOTA_PREFIX + quota);
|
||||
if (inviteMapping == null || inviteQuota == null || inviteQuota.getValue() < 1) {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.controller;
|
||||
|
||||
import java.util.List;
|
||||
@@ -101,7 +98,7 @@ public class InviteManagingController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("/{id}")
|
||||
public void delete(@PathVariable("id") Long id) {
|
||||
public void delete(@PathVariable Long id) {
|
||||
if (inviteManager.get(id) == null) {
|
||||
throw new EntityResponseStatusException(HttpStatus.CONFLICT);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.controller;
|
||||
|
||||
import java.util.List;
|
||||
@@ -92,7 +89,7 @@ public class InviteMappingController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("/{quota}")
|
||||
public void delete(@PathVariable("quota") String quota) {
|
||||
public void delete(@PathVariable String quota) {
|
||||
if (inviteMappingManager.get(quota) == null) {
|
||||
throw new EntityResponseStatusException(HttpStatus.CONFLICT);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.model;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.model;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.invite.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
Reference in New Issue
Block a user