comments
This commit is contained in:
parent
7e83d3fb95
commit
6fe7f5e161
@ -12,6 +12,9 @@ export class DataService {
|
|||||||
|
|
||||||
public list(p: DataParams): Observable<Data[]> {
|
public list(p: DataParams): Observable<Data[]> {
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
|
|
||||||
|
params = params.append('response_type', 'list');
|
||||||
|
|
||||||
if (p.start !== undefined) {
|
if (p.start !== undefined) {
|
||||||
params = params.append('start', p.start.toString());
|
params = params.append('start', p.start.toString());
|
||||||
}
|
}
|
||||||
@ -92,6 +95,8 @@ export class DataService {
|
|||||||
public find(p: DataParams): Observable<Data> {
|
public find(p: DataParams): Observable<Data> {
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
|
|
||||||
|
params = params.append('response_type', 'one');
|
||||||
|
|
||||||
// if
|
// if
|
||||||
if (p.idQuery !== undefined) {
|
if (p.idQuery !== undefined) {
|
||||||
params = params.append('id', '1');
|
params = params.append('id', '1');
|
||||||
@ -162,7 +167,8 @@ export class DataService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.http.get<Data>(this.rootURL + '1', {params: params});
|
|
||||||
|
return this.http.get<Data>(this.rootURL, {params: params});
|
||||||
}
|
}
|
||||||
|
|
||||||
public create(m: Data) {
|
public create(m: Data) {
|
||||||
|
@ -85,6 +85,7 @@ func (h *Handler) ListData(cx *gin.Context) {
|
|||||||
p.LocationQuery.Options = cx.Query("location.options")
|
p.LocationQuery.Options = cx.Query("location.options")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// int64
|
||||||
if age == "1" {
|
if age == "1" {
|
||||||
p.Age = true
|
p.Age = true
|
||||||
p.AgeQuery = repo.DataAgeQuery{}
|
p.AgeQuery = repo.DataAgeQuery{}
|
||||||
@ -104,6 +105,7 @@ func (h *Handler) ListData(cx *gin.Context) {
|
|||||||
p.AgeQuery.To = to
|
p.AgeQuery.To = to
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// float64
|
||||||
if price == "1" {
|
if price == "1" {
|
||||||
p.Price = true
|
p.Price = true
|
||||||
p.PriceQuery = repo.DataPriceQuery{}
|
p.PriceQuery = repo.DataPriceQuery{}
|
||||||
@ -121,6 +123,7 @@ func (h *Handler) ListData(cx *gin.Context) {
|
|||||||
p.PriceQuery.To = to
|
p.PriceQuery.To = to
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bool
|
||||||
if enabled == "1" {
|
if enabled == "1" {
|
||||||
p.Enabled = true
|
p.Enabled = true
|
||||||
p.EnabledQuery = repo.DataEnabledQuery{}
|
p.EnabledQuery = repo.DataEnabledQuery{}
|
||||||
|
Loading…
Reference in New Issue
Block a user