mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
import from google reader
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.commafeed.frontend.rest.resources;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import com.commafeed.backend.dao.ApplicationSettingsService;
|
||||
import com.commafeed.backend.model.ApplicationSettings;
|
||||
import com.commafeed.backend.model.UserRole.Role;
|
||||
import com.commafeed.frontend.SecurityCheck;
|
||||
|
||||
@SecurityCheck(Role.ADMIN)
|
||||
@Path("admin/settings")
|
||||
public class AdminSettingsREST {
|
||||
|
||||
@Inject
|
||||
ApplicationSettingsService applicationSettingsService;
|
||||
|
||||
@Path("get")
|
||||
@GET
|
||||
public ApplicationSettings get() {
|
||||
return applicationSettingsService.get();
|
||||
}
|
||||
|
||||
@Path("save")
|
||||
@POST
|
||||
public Response save(ApplicationSettings settings) {
|
||||
applicationSettingsService.save(settings);
|
||||
return Response.ok().build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user