forked from jsnbuchanan/crowd-funder-for-time-pwa
Merge branch 'master' into no-accounts-in-memory
This commit is contained in:
@@ -164,14 +164,11 @@ export default class DiscoverView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async search(beforeId?: string) {
|
public async search(beforeId?: string) {
|
||||||
const claimContents =
|
let queryParams = "claimContents=" + encodeURIComponent(this.searchTerms);
|
||||||
"claimContents=" + encodeURIComponent(this.searchTerms);
|
|
||||||
const claimType = "claimType=PlanAction";
|
|
||||||
let queryParams = [claimContents, claimType].join("&");
|
|
||||||
|
|
||||||
console.log(beforeId);
|
console.log(beforeId);
|
||||||
if (beforeId) {
|
if (beforeId) {
|
||||||
queryParams = queryParams + `beforeId=${beforeId}`;
|
queryParams = queryParams + `&beforeId=${beforeId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isRemoteActive = true;
|
this.isRemoteActive = true;
|
||||||
@@ -180,7 +177,7 @@ export default class DiscoverView extends Vue {
|
|||||||
try {
|
try {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
this.apiServer + "/api/v2/report/claims?" + queryParams,
|
this.apiServer + "/api/v2/report/plans?" + queryParams,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: await this.buildHeaders(),
|
headers: await this.buildHeaders(),
|
||||||
@@ -197,7 +194,7 @@ export default class DiscoverView extends Vue {
|
|||||||
const plans: ProjectData[] = results.data;
|
const plans: ProjectData[] = results.data;
|
||||||
if (plans) {
|
if (plans) {
|
||||||
for (const plan of plans) {
|
for (const plan of plans) {
|
||||||
const { name, description, handleId = plan.fullIri, rowid } = plan;
|
const { name, description, handleId = plan.handleId, rowid } = plan;
|
||||||
console.log("here");
|
console.log("here");
|
||||||
this.projects.push({ name, description, handleId, rowid });
|
this.projects.push({ name, description, handleId, rowid });
|
||||||
}
|
}
|
||||||
@@ -227,7 +224,7 @@ export default class DiscoverView extends Vue {
|
|||||||
].join("&");
|
].join("&");
|
||||||
|
|
||||||
if (beforeId) {
|
if (beforeId) {
|
||||||
queryParams = queryParams + `beforeId=${beforeId}`;
|
queryParams = queryParams + `&beforeId=${beforeId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -252,7 +249,7 @@ export default class DiscoverView extends Vue {
|
|||||||
if (beforeId) {
|
if (beforeId) {
|
||||||
const plans: ProjectData[] = results.data;
|
const plans: ProjectData[] = results.data;
|
||||||
for (const plan of plans) {
|
for (const plan of plans) {
|
||||||
const { name, description, handleId = plan.fullIri, rowid } = plan;
|
const { name, description, handleId = plan.handleId, rowid } = plan;
|
||||||
if (beforeId !== plan["rowid"]) {
|
if (beforeId !== plan["rowid"]) {
|
||||||
this.projects.push({ name, description, handleId, rowid });
|
this.projects.push({ name, description, handleId, rowid });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user