refactor(swapNutzapsToWalletController): change to POST method

This commit is contained in:
P. Reis 2025-02-07 22:41:39 -03:00
parent a6c7bbd751
commit f9da100936
2 changed files with 2 additions and 1 deletions

View file

@ -410,7 +410,7 @@ app.get('/api/v1/ditto/statuses/:id{[0-9a-f]{64}}/zapped_by', zappedByController
app.post('/api/v1/ditto/wallet/create', requireSigner, createCashuWalletController);
app.post('/api/v1/ditto/nutzap_information/create', requireSigner, createNutzapInformationController);
app.get('/api/v1/ditto/nutzap/swap_to_wallet', requireSigner, swapNutzapsToWalletController);
app.post('/api/v1/ditto/nutzap/swap_to_wallet', requireSigner, swapNutzapsToWalletController);
app.post('/api/v1/reports', requireSigner, reportController);
app.get('/api/v1/admin/reports', requireSigner, requireRole('admin'), adminReportsController);

View file

@ -573,6 +573,7 @@ export const swapNutzapsToWalletController: AppController = async (c) => {
}
});
// TODO: throw error if mintsToProofs is an empty object?
for (const mint of Object.keys(mintsToProofs)) {
const token = getEncodedToken({ mint, proofs: mintsToProofs[mint].proofs }, { version: 3 });