forked from trent_larson/crowd-funder-for-time-pwa
add new projects to front page
This commit is contained in:
@@ -112,6 +112,10 @@ export interface OfferSummaryRecord {
|
||||
validThrough: string;
|
||||
}
|
||||
|
||||
export interface OfferToPlanSummaryRecord extends OfferSummaryRecord {
|
||||
planName: string;
|
||||
}
|
||||
|
||||
// a summary record; the VC is not currently part of this record
|
||||
export interface PlanSummaryRecord {
|
||||
agentDid?: string; // optional, if the issuer wants someone else to manage as well
|
||||
@@ -603,6 +607,22 @@ export async function getNewOffersToUser(
|
||||
return offers;
|
||||
}
|
||||
|
||||
export async function getNewOffersToUserProjects(
|
||||
axios: Axios,
|
||||
apiServer: string,
|
||||
activeDid: string,
|
||||
lastAckedOfferToUserProjectsJwtId?: string,
|
||||
) {
|
||||
let url = `${apiServer}/api/v2/report/offersToPlansOwnedByMe`;
|
||||
if (lastAckedOfferToUserProjectsJwtId) {
|
||||
url += "?afterId=" + lastAckedOfferToUserProjectsJwtId;
|
||||
}
|
||||
const headers = await getHeaders(activeDid);
|
||||
const response = await axios.get(url, { headers });
|
||||
const offers = response.data.data;
|
||||
return offers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct GiveAction VC for submission to server
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user