feat: recorded import grants, unclaimed creators and claiming (#15)
Co-authored-by: dhkatz <[email protected]>
This commit was merged in pull request #15.
This commit is contained in:
1 parent
e6a97be894
commit
8f6dacba10
18 files changed
+5222
-26
No files matched your search
@@ -102,3 +102,13 @@ export async function revokeToken(_: ActionState, form: FormData): Promise<Actio
|
||||
return "Revoked.";
|
||||
});
|
||||
}
|
||||
|
||||
/** Claims what an admin recorded for an IMVU account of theirs (an unclaimed creator's products and grants). */
|
||||
export async function claimCreator(_: ActionState, form: FormData): Promise<ActionState> {
|
||||
return attempt(async () => {
|
||||
const r = unwrap(await api.account.claims({ imvu: field(form, "imvuId") }).post());
|
||||
done();
|
||||
revalidatePath("/imports");
|
||||
return `They're yours: ${r.products} product${r.products === 1 ? "" : "s"}. Manage them on the Imports page.`;
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user