package org.xcolab.service.members.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import org.xcolab.model.tables.pojos.StaffMember;
import org.xcolab.service.members.domain.staffmember.StaffMemberDao;
import org.xcolab.service.utils.PaginationHelper;

import java.util.List;

@RestController
public class StaffMemberController {

    private final StaffMemberDao staffUserDao;

    @Autowired
    public StaffMemberController(StaffMemberDao staffUserDao) {
        this.staffUserDao = staffUserDao;
    }

    @RequestMapping(value = "staffUsers", method = RequestMethod.GET)
    public List<StaffMember> listStaffMembers(
            @RequestParam(required = false) Integer startRecord,
            @RequestParam(required = false) Integer limitRecord,
            @RequestParam(required = false) String sort,
            @RequestParam(required = false) Long categoryId) {
        PaginationHelper paginationHelper = new PaginationHelper(startRecord, limitRecord, sort);
        return staffUserDao.findByGiven(paginationHelper, categoryId);
    }
}

@@ -144,22 +144,18 @@
 otation.
-Reques
+Ge
 tMapping
@@ -160,70 +160,8 @@
 ng;%0A
-import org.springframework.web.bind.annotation.RequestMethod;%0A
 impo
@@ -563,26 +563,28 @@
 berDao staff
-Us
+Memb
 erDao;%0A%0A    
@@ -643,26 +643,28 @@
 berDao staff
-Us
+Memb
 erDao) %7B%0A   
@@ -674,26 +674,28 @@
   this.staff
-Us
+Memb
 erDao = staf
@@ -691,26 +691,28 @@
 rDao = staff
-Us
+Memb
 erDao;%0A    %7D
@@ -718,22 +718,18 @@
 %7D%0A%0A    @
-Reques
+Ge
 tMapping
@@ -733,56 +733,22 @@
 ing(
-value = %22staffUsers%22, method = RequestMethod.GET
+%22staffMembers%22
 )%0A  
@@ -1164,10 +1164,12 @@
 taff
-Us
+Memb
 erDa

Fix staff members widget error