Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Allow DELETE calls #5515

Merged
merged 1 commit into from
Jun 29, 2023
Merged

API: Allow DELETE calls #5515

merged 1 commit into from
Jun 29, 2023

Conversation

AustP
Copy link
Contributor

@AustP AustP commented Jun 28, 2023

Summary

The algod REST API has some methods that require DELETE calls. In particular, I want to delete a participation key. Making a DELETE call currently gives the following error:

Access to fetch at 'http://localhost:8080/v2/participation/{participation-id}' from origin 'http://localhost:3000' has been blocked by CORS policy: Method DELETE is not allowed by Access-Control-Allow-Methods in preflight response.

This PR adds the DELETE method to the the Access-Control-Allow-Methods so the DELETE endpoints will work.

Test Plan

I started the node, generated a key, and then deleted the key via the API to make sure it worked.

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #5515 (a721ab7) into master (533507a) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #5515   +/-   ##
=======================================
  Coverage   55.78%   55.79%           
=======================================
  Files         446      446           
  Lines       63228    63228           
=======================================
+ Hits        35274    35275    +1     
+ Misses      25583    25581    -2     
- Partials     2371     2372    +1     
Impacted Files Coverage Δ
daemon/algod/api/server/lib/middlewares/cors.go 0.00% <0.00%> (ø)

... and 15 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@winder winder merged commit 11a180f into algorand:master Jun 29, 2023
@winder
Copy link
Contributor

winder commented Jun 29, 2023

Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants