MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / setPurchaseTag

Function setPurchaseTag

background.js:2141–2152  ·  view source on GitHub ↗
(purchaseId, { tagId, tagName } = {})

Source from the content-addressed store, hash-verified

2139 });
2140 },
2141 async setPurchaseTag(purchaseId, { tagId, tagName } = {}) {
2142 const body = {};
2143 if (tagId !== undefined) {
2144 body.tag_id = Number(tagId) || 0;
2145 }
2146 if (tagName !== undefined) {
2147 body.tag_name = String(tagName || '').trim();
2148 }
2149 await request('PUT', `/api/v1/openapi/email/purchases/${encodeURIComponent(purchaseId)}/tag`, {
2150 jsonData: body,
2151 });
2152 },
2153 async batchSetPurchaseTag(ids, { tagId, tagName } = {}) {
2154 const body = {
2155 ids: (Array.isArray(ids) ? ids : []).map((id) => Number(id)).filter((id) => Number.isFinite(id) && id > 0),

Callers

nothing calls this directly

Calls 1

requestFunction · 0.85

Tested by

no test coverage detected