forked from trent_larson/crowd-funder-for-time-pwa
change jwtId to rowid for paging within a derivative/cached table
This commit is contained in:
@@ -131,7 +131,7 @@ interface ProjectData {
|
|||||||
/**
|
/**
|
||||||
* The Identier of the project
|
* The Identier of the project
|
||||||
**/
|
**/
|
||||||
jwtId: string;
|
rowid: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -163,8 +163,8 @@ export default class ProjectsView extends Vue {
|
|||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
const plans: ProjectData[] = resp.data.data;
|
const plans: ProjectData[] = resp.data.data;
|
||||||
for (const plan of plans) {
|
for (const plan of plans) {
|
||||||
const { name, description, handleId = plan.fullIri, jwtId } = plan;
|
const { name, description, handleId = plan.fullIri, rowid } = plan;
|
||||||
this.projects.push({ name, description, handleId, jwtId });
|
this.projects.push({ name, description, handleId, rowid });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -179,7 +179,7 @@ export default class ProjectsView extends Vue {
|
|||||||
async loadMoreData(payload: boolean) {
|
async loadMoreData(payload: boolean) {
|
||||||
if (this.projects.length > 0) {
|
if (this.projects.length > 0) {
|
||||||
const latestProject = this.projects[this.projects.length - 1];
|
const latestProject = this.projects[this.projects.length - 1];
|
||||||
const url = `${this.apiServer}/api/v2/report/plansByIssuer?beforeId=${latestProject.jwtId}`;
|
const url = `${this.apiServer}/api/v2/report/plansByIssuer?beforeId=${latestProject.rowid}`;
|
||||||
const token = await accessToken(this.current);
|
const token = await accessToken(this.current);
|
||||||
await this.dataLoader(url, token);
|
await this.dataLoader(url, token);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user