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

Support for custom actions #200

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

haffi96
Copy link

@haffi96 haffi96 commented Nov 5, 2022

Needed for the POC here piccolo-orm/piccolo_admin#244

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2022

Codecov Report

Merging #200 (d4f635e) into master (5c3569e) will decrease coverage by 0.35%.
The diff coverage is 55.55%.

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
- Coverage   92.47%   92.11%   -0.36%     
==========================================
  Files          32       32              
  Lines        1846     1864      +18     
==========================================
+ Hits         1707     1717      +10     
- Misses        139      147       +8     
Impacted Files Coverage Δ
piccolo_api/fastapi/endpoints.py 92.80% <55.55%> (-5.55%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@haffi96 haffi96 changed the title Support for custom callbacks Support for custom actions Nov 11, 2022
@haffi96 haffi96 force-pushed the Adding-support-for-custom-callbacks-per-table branch from 1ca4145 to d9e3e91 Compare November 19, 2022 18:39
@haffi96 haffi96 marked this pull request as ready for review November 19, 2022 18:52
@dantownsend
Copy link
Member

If it's possible without too much hassle, it would be cool if we could move the actions code down to PiccoloCRUD, and expose it via FastAPIWrapper. It just means someone could potentially use this functionality in a standalone API.

#######################################################################
# Root - Actions execute

async def run_action(request: Request) -> JSONResponse:

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
@haffi96
Copy link
Author

haffi96 commented Nov 21, 2022

If it's possible without too much hassle, it would be cool if we could move the actions code down to PiccoloCRUD, and expose it via FastAPIWrapper. It just means someone could potentially use this functionality in a standalone API.

Sure. That sounds like a good idea. Btw ill definitely update the unit testing etc to ensure a passing CI. Just wanted to get to the point where we have the final ish design first

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

Successfully merging this pull request may close these issues.

3 participants