Skip to content
Permalink
Browse files

[#4] json validation decorator 제거, CORS extension 제거

  • Loading branch information...
JoMingyu committed Feb 23, 2019
1 parent 23fe371 commit e3c6e86d6a91e170db7b0c72a14720fbdfaa43bf
Showing with 1 addition and 42 deletions.
  1. +1 −3 app/__init__.py
  2. +0 −22 app/decorators/json_validator.py
  3. +0 −3 app/extensions.py
  4. +0 −14 app/views/sample/sample.py
@@ -5,9 +5,7 @@


def register_extensions(flask_app: Flask):
from app import extensions

extensions.cors.init_app(flask_app)
pass


def register_views(flask_app: Flask):

This file was deleted.

Oops, something went wrong.
@@ -1,3 +0,0 @@
from flask_cors import CORS

cors = CORS()
@@ -1,23 +1,9 @@
from flask import request

from app.decorators.json_validator import validate_with_jsonschema
from app.views.base import BaseResource


class Sample(BaseResource):
@validate_with_jsonschema({
'type': 'object',
'required': ['age', 'name'],
'properties': {
'age': {
'type': 'integer',
'minimum': 0
},
'name': {
'type': 'string'
}
}
}, strict=True)
def post(self):
payload = request.json

0 comments on commit e3c6e86

Please sign in to comment.
You can’t perform that action at this time.