Skip to content

Change maintenance PUT endpoints match what SciGateway expects#170

Merged
louise-davies merged 2 commits intomainfrom
147-fix-put-maintenance-endpoints
Jan 15, 2026
Merged

Change maintenance PUT endpoints match what SciGateway expects#170
louise-davies merged 2 commits intomainfrom
147-fix-put-maintenance-endpoints

Conversation

@louise-davies
Copy link
Copy Markdown
Member

@louise-davies louise-davies commented Jan 14, 2026

Description

OG-api and sg-auth handled the maintenance endpoints slightly differently, and in SciGateway I unified things so everything uses the same maintenance code. I decided the OG way of doing things (passing the token via the Authorization header, and the body is just the new maintenance state) seemed better so I changed SGW to expect that signature. This then aligns scigateway-auth to use the same signature.

Testing Instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check GitHub Actions build
  • Review changes to test coverage
  • I have deployed it to the DLS dev stack (ask me for the url) and it's working well

Agile Board Tracking

Closes #147

Copy link
Copy Markdown
Contributor

@patrick-austin patrick-austin left a comment

Choose a reason for hiding this comment

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

Refactor looks good to me, and (for what it's worth) I also prefer doing it this way (auth/tokens/etc. handled with Depends rather than being part of the request body).

@louise-davies louise-davies merged commit 4d23bfd into main Jan 15, 2026
14 of 15 checks passed
@louise-davies louise-davies deleted the 147-fix-put-maintenance-endpoints branch January 15, 2026 10:06
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.

PUT maintenance endpoints should take in token via Authorization header

2 participants