- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Add update endpoints for service admins #355
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
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            14 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      6b7c4c0
              
                Bring changes from main
              
              
                eleftherioszisis 9b4d005
              
                Add routers
              
              
                eleftherioszisis 17cc49c
              
                Add service
              
              
                eleftherioszisis de8fd64
              
                Adapt activity router for None context
              
              
                eleftherioszisis 74e6f53
              
                Add schemas
              
              
                eleftherioszisis 667127f
              
                Add tests
              
              
                eleftherioszisis cc56039
              
                Adapt activities
              
              
                eleftherioszisis 88a88de
              
                Fix lint
              
              
                eleftherioszisis af06c81
              
                Fixes
              
              
                eleftherioszisis cbe4bd7
              
                Reuse literal type
              
              
                eleftherioszisis f12845b
              
                Refactor tests
              
              
                eleftherioszisis fcd0032
              
                Missing route
              
              
                eleftherioszisis daecc77
              
                Add missing endpoints
              
              
                eleftherioszisis 477be8b
              
                Rename Update schemas to UserUpdate
              
              
                eleftherioszisis File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,11 +1,21 @@ | ||
| from fastapi import APIRouter | ||
|  | ||
| import app.service.brain_region | ||
| from app.routers.admin import router as admin_router | ||
|  | ||
| ROUTE = "brain-region" | ||
|  | ||
| router = APIRouter( | ||
| prefix="/brain-region", | ||
| tags=["brain-region"], | ||
| prefix=f"/{ROUTE}", | ||
| tags=[ROUTE], | ||
| ) | ||
|  | ||
| read_many = router.get("")(app.service.brain_region.read_many) | ||
| read_one = router.get("/{id_}")(app.service.brain_region.read_one) | ||
| create_one = router.post("")(app.service.brain_region.create_one) | ||
| update_one = router.patch("/{id_}")(app.service.brain_region.update_one) | ||
|  | ||
| admin_read_one = admin_router.get(f"/{ROUTE}/{{id_}}")(app.service.brain_region.admin_read_one) | ||
| admin_update_one = admin_router.patch(f"/{ROUTE}/{{id_}}")( | ||
| app.service.brain_region.admin_update_one | ||
| ) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,13 +1,21 @@ | ||
| from fastapi import APIRouter | ||
|  | ||
| import app.service.em_cell_mesh | ||
| from app.routers.admin import router as admin_router | ||
|  | ||
| ROUTE = "em-cell-mesh" | ||
|  | ||
| router = APIRouter( | ||
| prefix="/em-cell-mesh", | ||
| tags=["em-cell-mesh"], | ||
| prefix=f"/{ROUTE}", | ||
| tags=[ROUTE], | ||
| ) | ||
|  | ||
| read_many = router.get("")(app.service.em_cell_mesh.read_many) | ||
| read_one = router.get("/{id_}")(app.service.em_cell_mesh.read_one) | ||
| create_one = router.post("")(app.service.em_cell_mesh.create_one) | ||
| update_one = router.patch("/{id_}")(app.service.em_cell_mesh.update_one) | ||
|  | ||
| admin_read_one = admin_router.get(f"/{ROUTE}/{{id_}}")(app.service.em_cell_mesh.admin_read_one) | ||
| admin_update_one = admin_router.patch(f"/{ROUTE}/{{id_}}")( | ||
| app.service.em_cell_mesh.admin_update_one | ||
| ) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,12 +1,19 @@ | ||
| from fastapi import APIRouter | ||
|  | ||
| import app.service.ion_channel | ||
| from app.routers.admin import router as admin_router | ||
|  | ||
| ROUTE = "ion-channel" | ||
|  | ||
| router = APIRouter( | ||
| prefix="/ion-channel", | ||
| tags=["ion-channel"], | ||
| prefix=f"/{ROUTE}", | ||
| tags=[ROUTE], | ||
| ) | ||
|  | ||
| read_many = router.get("")(app.service.ion_channel.read_many) | ||
| read_one = router.get("/{id_}")(app.service.ion_channel.read_one) | ||
| create_one = router.post("")(app.service.ion_channel.create_one) | ||
| update_one = router.patch("/{id_}")(app.service.ion_channel.update_one) | ||
|  | ||
| admin_read_one = admin_router.get(f"/{ROUTE}/{{id_}}")(app.service.ion_channel.admin_read_one) | ||
| admin_update_one = admin_router.patch(f"/{ROUTE}/{{id_}}")(app.service.ion_channel.admin_update_one) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,13 +1,23 @@ | ||
| from fastapi import APIRouter | ||
|  | ||
| import app.service.ion_channel_recording | ||
| from app.routers.admin import router as admin_router | ||
|  | ||
| ROUTE = "ion-channel-recording" | ||
|  | ||
| router = APIRouter( | ||
| prefix="/ion-channel-recording", | ||
| tags=["ion-channel-recording"], | ||
| prefix=f"/{ROUTE}", | ||
| tags=[ROUTE], | ||
| ) | ||
|  | ||
| read_many = router.get("")(app.service.ion_channel_recording.read_many) | ||
| read_one = router.get("/{id_}")(app.service.ion_channel_recording.read_one) | ||
| create_one = router.post("")(app.service.ion_channel_recording.create_one) | ||
| update_one = router.patch("/{id_}")(app.service.ion_channel_recording.update_one) | ||
|  | ||
| admin_read_one = admin_router.get(f"/{ROUTE}/{{id_}}")( | ||
| app.service.ion_channel_recording.admin_read_one | ||
| ) | ||
| admin_update_one = admin_router.patch(f"/{ROUTE}/{{id_}}")( | ||
| app.service.ion_channel_recording.admin_update_one | ||
| ) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,12 +1,19 @@ | ||
| from fastapi import APIRouter | ||
|  | ||
| import app.service.species | ||
| from app.routers.admin import router as admin_router | ||
|  | ||
| ROUTE = "species" | ||
|  | ||
| router = APIRouter( | ||
| prefix="/species", | ||
| tags=["species"], | ||
| prefix=f"/{ROUTE}", | ||
| tags=[ROUTE], | ||
| ) | ||
|  | ||
| read_many = router.get("")(app.service.species.read_many) | ||
| read_one = router.get("/{id_}")(app.service.species.read_one) | ||
| create_one = router.post("")(app.service.species.create_one) | ||
| update_one = router.patch("/{id_}")(app.service.species.update_one) | ||
|  | ||
| admin_read_one = admin_router.get(f"/{ROUTE}/{{id_}}")(app.service.species.admin_read_one) | ||
| admin_update_one = admin_router.patch(f"/{ROUTE}/{{id_}}")(app.service.species.admin_update_one) | 
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.