v1.0.0
This commit is contained in:
@@ -5,7 +5,7 @@ class HistoryHomesteadController {
|
||||
const { homestead_id } = req.params;
|
||||
|
||||
if (homestead_id) {
|
||||
if (req.sheepRole == "administrator" || req.moderator.can_manager_territory) {
|
||||
if (req.possibilities.can_manager_territory) {
|
||||
let result = await HistoryHomesteadService.getHistoryHomestead(homestead_id);
|
||||
if (result) {
|
||||
return res
|
||||
@@ -33,7 +33,7 @@ class HistoryHomesteadController {
|
||||
const data = req.body;
|
||||
|
||||
if (homestead_id) {
|
||||
if (req.sheepRole == "administrator" || req.moderator.can_manager_territory) {
|
||||
if (req.possibilities.can_manager_territory) {
|
||||
let result = await HistoryHomesteadService.createHistoryHomestead(
|
||||
homestead_id,
|
||||
data
|
||||
@@ -63,7 +63,7 @@ class HistoryHomesteadController {
|
||||
const { homestead_id } = req.params;
|
||||
|
||||
if (homestead_id) {
|
||||
if (req.sheepRole == "administrator" || req.moderator.can_manager_territory) {
|
||||
if (req.possibilities.can_manager_territory) {
|
||||
let result = await HistoryHomesteadService.updateHistoryHomestead(homestead_id);
|
||||
if (result) {
|
||||
return res.status(200).send(result);
|
||||
@@ -88,7 +88,7 @@ class HistoryHomesteadController {
|
||||
const { homestead_id } = req.params;
|
||||
|
||||
if (homestead_id) {
|
||||
if (req.sheepRole == "administrator" || req.moderator.can_manager_territory) {
|
||||
if (req.possibilities.can_manager_territory) {
|
||||
let result = await HistoryHomesteadService.deleteHistoryHomestead(homestead_id);
|
||||
if (result) {
|
||||
return res.status(200).send(result);
|
||||
|
||||
Reference in New Issue
Block a user