Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dni
Copy link
Member

@dni dni commented Mar 21, 2024

  • add to admin ui
  • move to ExtensionsSettings
  • hide left navbar when disabled
  • do not register extension routes on startup
  • do not check for installed extensions on startup
    screenshot-1711036830
    screenshot-1711036664

@codecov
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 58.35%. Comparing base (86821f4) to head (f0b50d1).

Files Patch % Lines
lnbits/app.py 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2341      +/-   ##
==========================================
+ Coverage   57.44%   58.35%   +0.90%     
==========================================
  Files          61       61              
  Lines        9334     9336       +2     
==========================================
+ Hits         5362     5448      +86     
+ Misses       3972     3888      -84     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arbadacarbaYK
Copy link
Contributor

Does this affect paid extensions ? Is the payment to be redone if reactivated ?
Are API calls for extensions also prevented ?

@dni
Copy link
Member Author

dni commented Mar 22, 2024

disabled all extension and it lets you run lnbits without them, maybe if you don't need any.
its most useful when developing on core.

@dni dni added this to the 0.12.4 milestone Mar 22, 2024
@dni dni force-pushed the feat-disable-exts branch from d057ee3 to cee60c1 Compare March 22, 2024 15:02
dni added 2 commits March 26, 2024 10:48
- add to admin ui
- move to `ExtensionsSettings`
- hide left navbar when disabled
- do not register extension routes on startup
- do not check for installed extensions on startup
@dni dni force-pushed the feat-disable-exts branch from cee60c1 to b1bf40f Compare March 26, 2024 09:48
ext.nofiy_upgrade()


def register_routes(app: FastAPI) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • why remove this method?
  • it is better to have many small methods with well defined names rather than bigger methods which are hard to follow

Copy link
Member Author

@dni dni Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case i absolutely disagree, register_routes mixing up registering extension routes with initializing the core routers.

helper function for helper functions are hard to follow because you jump around everywhere in the code and makes it so you cant follow it!

it is a balance and it this case it went 1 abstraction too far

@dni dni added the enhancement Make something better label Mar 26, 2024
@dni dni changed the title feat: complete use of LNBITS_EXTENSIONS_DEACTIVE_ALL feat: complete use of LNBITS_EXTENSIONS_DEACTIVATE_ALL Mar 26, 2024
@dni dni merged commit b9f0af0 into dev Mar 26, 2024
@dni dni deleted the feat-disable-exts branch March 26, 2024 10:44
bitkarrot pushed a commit to bitkarrot/lnbits-legend that referenced this pull request Mar 28, 2024
- add to admin ui
- move to `ExtensionsSettings`
- hide left navbar when disabled
- do not register extension routes on startup
- do not check for installed extensions on startup
- reafctor into register_all_ext_routes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Make something better

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants