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

nuke: remove useless pages and REST API #73

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions backend/python/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ def create_app(config_name):
mysql.init_app(app)
firebase_admin.initialize_app()

from . import models, rest
from . import models

models.init_app(app)
rest.init_app(app)

from . import graphql

Expand Down
3 changes: 0 additions & 3 deletions backend/python/app/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def db(app):
"""
from .models import db
from .models.comment import Comment
from .models.entity import Entity
from .models.file import File
from .models.story import Story
from .models.story_content import StoryContent
Expand All @@ -53,13 +52,11 @@ def services(app):
Returns model services
"""
from .services.implementations.comment_service import CommentService
from .services.implementations.entity_service import EntityService
from .services.implementations.story_service import StoryService
from .services.implementations.user_service import UserService

return {
"comment": CommentService(),
"entity": EntityService(),
"story": StoryService(),
"user": UserService(),
}
Expand Down
2 changes: 0 additions & 2 deletions backend/python/app/graphql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from ..services.implementations.auth_service import AuthService
from ..services.implementations.comment_service import CommentService
from ..services.implementations.email_service import EmailService
from ..services.implementations.entity_service import EntityService
from ..services.implementations.file_service import FileService
from ..services.implementations.story_service import StoryService
from ..services.implementations.user_service import UserService
Expand All @@ -27,7 +26,6 @@ def init_app(app):
)

services["comment"] = CommentService(current_app.logger)
services["entity"] = EntityService(current_app.logger)
services["file"] = FileService(current_app.logger)
services["story"] = StoryService(current_app.logger)
services["user"] = UserService(current_app.logger)
Expand Down
24 changes: 0 additions & 24 deletions backend/python/app/graphql/mutations/entity_mutation.py

This file was deleted.

7 changes: 0 additions & 7 deletions backend/python/app/graphql/queries/entity_query.py

This file was deleted.

8 changes: 0 additions & 8 deletions backend/python/app/graphql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
SignUp,
)
from .mutations.comment_mutation import CreateComment, UpdateCommentById, UpdateComments
from .mutations.entity_mutation import CreateEntity
from .mutations.file_mutation import CreateFile
from .mutations.story_mutation import (
AssignUserAsReviewer,
Expand All @@ -19,7 +18,6 @@
)
from .mutations.user_mutation import CreateUser, UpdateUser
from .queries.comment_query import resolve_comments_by_story_translation
from .queries.entity_query import resolve_entities
from .queries.file_query import resolve_file_by_id
from .queries.story_query import (
resolve_stories,
Expand All @@ -31,15 +29,13 @@
)
from .queries.user_query import resolve_user_by_email, resolve_user_by_id, resolve_users
from .types.comment_type import CommentResponseDTO
from .types.entity_type import EntityResponseDTO
from .types.file_type import FileDTO
from .types.story_type import StoryResponseDTO, StoryTranslationResponseDTO
from .types.user_type import UserDTO


class Mutation(graphene.ObjectType):
create_comment = CreateComment.Field()
create_entity = CreateEntity.Field()
create_file = CreateFile.Field()
create_story = CreateStory.Field()
create_user = CreateUser.Field()
Expand All @@ -61,7 +57,6 @@ class Query(graphene.ObjectType):
comments_by_story_translation = graphene.Field(
graphene.List(CommentResponseDTO), story_translation_id=graphene.Int()
)
entities = graphene.Field(graphene.List(EntityResponseDTO))
file_by_id = graphene.Field(FileDTO, id=graphene.Int())
stories = graphene.Field(graphene.List(StoryResponseDTO))
story_by_id = graphene.Field(StoryResponseDTO, id=graphene.Int())
Expand Down Expand Up @@ -93,9 +88,6 @@ class Query(graphene.ObjectType):
def resolve_comments_by_story_translation(root, info, story_translation_id):
return resolve_comments_by_story_translation(root, info, story_translation_id)

def resolve_entities(root, info, **kwargs):
return resolve_entities(root, info, **kwargs)

def resolve_file_by_id(root, info, id):
return resolve_file_by_id(root, info, id)

Expand Down
2 changes: 0 additions & 2 deletions backend/python/app/graphql/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
updated with live app loggers during __init__.py
"""
from ..services.implementations.comment_service import CommentService
from ..services.implementations.entity_service import EntityService
from ..services.implementations.story_service import StoryService
from ..services.implementations.user_service import UserService

services = {
"comment": CommentService(),
"entity": EntityService(),
"story": StoryService(),
"user": UserService(),
}
25 changes: 0 additions & 25 deletions backend/python/app/graphql/types/entity_type.py

This file was deleted.

1 change: 0 additions & 1 deletion backend/python/app/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

def init_app(app):
from .comment import Comment
from .entity import Entity
from .file import File
from .story import Story
from .story_content import StoryContent
Expand Down
46 changes: 0 additions & 46 deletions backend/python/app/models/entity.py

This file was deleted.

3 changes: 0 additions & 3 deletions backend/python/app/models/enum.py

This file was deleted.

25 changes: 0 additions & 25 deletions backend/python/app/resources/entity_dto.py

This file was deleted.

7 changes: 0 additions & 7 deletions backend/python/app/rest/__init__.py

This file was deleted.

Loading