Esempio n. 1
0
        public JsonResult LogAppDeletedEvent(string instaceId, string wixSiteUrl)
        {
            var success = false;

            try
            {
                var additionalData = "instance Id = " + instaceId + " ; Wix Site Url = " + wixSiteUrl;
                success = EventLoggerService.Report(new ReportToken
                {
                    UserId             = CurrentUserId,
                    EventType          = CommonEnums.eUserEvents.WIX_APP_DELETED,
                    NetSessionId       = Session.SessionID,
                    AdditionalMiscData = additionalData,
                    HostName           = GetReferrer()
                });

                string error;
                WidgetEndpointServices.UninstallPlugin(instaceId, out error);

                return(Json(new JsonResponseToken {
                    success = success
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(new JsonResponseToken {
                    success = success, error = Utils.FormatError(ex)
                }, JsonRequestBehavior.AllowGet));
            }
        }
Esempio n. 2
0
        public HttpResponseMessage UnInstall(string uid)
        {
            Logger.Debug(String.Format("PLUGIN UNINSTALL MSG::uid = {0}", uid));

            if (String.IsNullOrEmpty(uid))
            {
                return(new HttpResponseMessage(HttpStatusCode.BadRequest));
            }

            string error;
            var    result = WidgetEndpointServices.UninstallPlugin(uid, out error);

            Logger.Debug(String.Format("PLUGIN UNINSTALL MSG::installed{0}::uid = {1}", result, uid));

            return(new HttpResponseMessage(result ? HttpStatusCode.OK : HttpStatusCode.InternalServerError));
        }