Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 11315 | Rev 11399 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11315 Rev 11331
Línea 955... Línea 955...
955
    
955
    
956
    public function oneFeedAction(){
956
    public function oneFeedAction(){
957
        $currentUserPlugin = $this->plugin('currentUserPlugin');
957
        $currentUserPlugin = $this->plugin('currentUserPlugin');
958
        $currentUser = $currentUserPlugin->getUser();
958
        $currentUser = $currentUserPlugin->getUser();
959
        $currentCompany = $currentUserPlugin->getCompany();
959
        $currentCompany = $currentUserPlugin->getCompany();
960
        try{
960
 
961
        $request = $this->getRequest();
961
        $request = $this->getRequest();
Línea -... Línea 962...
-
 
962
        if($request->isGet()) {
962
        if($request->isGet()) {
963
            
Línea -... Línea 964...
-
 
964
            $feed_uuid =  $this->params()->fromRoute('feed_id');
-
 
965
            $myt_id =  $this->params()->fromRoute('myt_id');
-
 
966
           
-
 
967
            if(!isset($feed_uuid)){
-
 
968
                    $data = [
963
            
969
                        'success'   => false,
-
 
970
                        'data'   => 'ERROR_INVALID_PARAMETER'
-
 
971
                    ];
Línea 964... Línea 972...
964
            $myt_id =  $this->params()->fromRoute('myt_id');
972
                    
-
 
973
                    return new JsonModel($data);
-
 
974
            }
965
           
975
                   
-
 
976
            $items = [];
-
 
977
            $feedMapper = FeedMapper::getInstance($this->adapter);
-
 
978
            $feed  = $feedMapper->fetchOneByUuid($feed_uuid);
-
 
979
 
-
 
980
            if (!$feed) {
-
 
981
                $data = [
-
 
982
                    'success' => false,
-
 
983
                    'data' => 'ERROR_RECORD_NOT_FOUND'
Línea 966... Línea 984...
966
            
984
                ];
967
                   
985
        
968
            $items = [];
986
                return new JsonModel($data);
Línea 1086... Línea 1104...
1086
                        'feed_title'=>$feed->title
1104
                        'feed_title'=>$feed->title
1087
                    ]
1105
                    ]
1088
                ];
1106
                ];
1089
            }
1107
            }
Línea -... Línea 1108...
-
 
1108
            
1090
            
1109
            return new JsonModel($response);
1091
            }
-
 
1092
        } catch (\Throwable $e) {
-
 
1093
            $e->getMessage();
-
 
1094
            return new JsonModel([
-
 
1095
                'success' => false,
-
 
1096
                'data' => $e
-
 
1097
            ]);
-
 
1098
        }
1110
            }
1099
    }
1111
    }
1100
    /**
1112
    /**
1101
     *
1113
     *
1102
     * @param string $str
1114
     * @param string $str