Skip to content

Commit

Permalink
feat(admin): added initial version of admin resources
Browse files Browse the repository at this point in the history
  • Loading branch information
zZHorizonZz committed Aug 11, 2024
1 parent 0284ee9 commit a4dac65
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 8 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package dev.cloudeko.zenei.application.web.resource;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import lombok.AllArgsConstructor;
import org.eclipse.microprofile.openapi.annotations.tags.Tag;

import javax.annotation.security.RolesAllowed;

@AllArgsConstructor
@RolesAllowed("admin")
@Path("/admin/settings")
@Tag(name = "Admin Settings Service", description = "API for managing settings of the application")
public class AdminSettingsResource {

@GET
@Produces(MediaType.APPLICATION_JSON)
public String getSettings() {
return "Settings";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package dev.cloudeko.zenei.application.web.resource;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import lombok.AllArgsConstructor;
import org.eclipse.microprofile.openapi.annotations.tags.Tag;

import javax.annotation.security.RolesAllowed;

@AllArgsConstructor
@RolesAllowed("admin")
@Path("/admin/users")
@Tag(name = "Admin Users Service", description = "API for managing users")
public class AdminUsersResource {

@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getUsers(@QueryParam("page") Integer page, @QueryParam("size") Integer size) {
return Response.ok().build();
}
}

This file was deleted.

0 comments on commit a4dac65

Please sign in to comment.