public IHttpActionResult SecureListDocs() { var parms = new ParamCollection(Request.RequestUri.ParseQueryString()); var osuId = parms.Get("osuId", 0); if (osuId == 0) { return(BadRequest("A valid OSUID is required.")); } var timeToLive = parms.Get("timeToLive", DefaultTimeToLive); long startDocId = 0; var startDocHash = parms.Get("filter[startDocHash]", DefaultStartDocId); var filter = new DocListFilter { IndexKey = parms.Get("filter[indexKey]", DefaultIndexKey), DocTypeGroup = parms.Get("filter[docTypeGroup]", DefaultTypeGroup), DocType = parms.Get("filter[docType]", DefaultDocType), StartDocId = startDocId, PageSize = parms.Get("filter[pageSize]", DefaultPageSize), KeywordsHasAll = parms.Get("filter[keywords][hasAll]", DefaultKeywords), }; return(ListDocs <SecureDocumentAttributes>(filter, d => SecureDocumentResource(osuId, timeToLive, d))); }
public IHttpActionResult ListDocs() { var parms = new ParamCollection(Request.RequestUri.ParseQueryString()); var filter = new DocListFilter { IndexKey = parms.Get("filter[indexKey]", DefaultIndexKey), DocTypeGroup = parms.Get("filter[typeGroup]", DefaultTypeGroup), DocType = parms.Get("filter[type]", DefaultDocType), StartDocId = parms.Get("filter[startDocId]", DefaultStartDocId), PageSize = parms.Get("filter[pageSize]", DefaultPageSize), KeywordsHasAll = parms.Get("filter[keywords][hasAll]", DefaultKeywords), }; return(ListDocs <DocumentAttributes>(filter, d => DocumentResource(d))); }