public object Put(OtoFiles request) { if (request.Guid != "" && request.Version != "" && request.VersionDefault == "true") { DataStore.DataStore.Instance().SetAppDefaultVersion(request.Guid, request.Version); } return(HttpError.NotFound("Could not PUT this version request")); }
public object Get(OtoFiles request) { if (request.File != null && request.File != "") { return(RetrieveFileFromStore(request.Guid, request.Version, request.File)); } else { return(FilterStoreToResponse(DataStore.DataStore.Instance().KnownApps, request.Guid, request.Version)); } }
public void Post(OtoFiles request) { if (request.Guid != null && request.AppName != null) { DataStore.DataStore.Instance().AddApp(request.AppName, request.Guid); } if (request.Guid != null && request.Version != null && RequestContext.Files.Length == 0) { DataStore.DataStore.Instance().AddAppVersion(request.Guid, request.Version); } if (request.Guid != null && request.Version != null && RequestContext.Files.Length > 0) { DataStore.DataStore.Instance().AddAppVersionFile(request.Guid, request.Version, RequestContext.Files); } }