| | |
| | | |
| | | return $this->error('Failed to create request'); |
| | | } catch (Exception $e) { |
| | | $this->logError('createRequest', [ |
| | | 'error' => $e->getMessage(), |
| | | $this->logError($e->getMessage(),'createRequest', [ |
| | | 'user_id' => $userID, |
| | | 'term_id' => $termID |
| | | ]); |
| | |
| | | return $this->success(['message' => 'Request ' . $status]); |
| | | |
| | | } catch (Exception $e) { |
| | | $this->logError('processRequest', [ |
| | | 'error' => $e->getMessage(), |
| | | $this->logError($e->getMessage(), 'processRequest', [ |
| | | 'request_id' => $requestID, |
| | | 'action' => $action |
| | | ]); |
| | |
| | | return $this->error('Failed to update permissions'); |
| | | |
| | | } catch (Exception $e) { |
| | | $this->logError('updatePermissions', [ |
| | | 'error' => $e->getMessage(), |
| | | $this->logError($e->getMessage(),'updatePermissions', [ |
| | | 'term_id' => $termID, |
| | | 'target_user' => $targetUserID, |
| | | 'role' => $role |