Skip to content

Commit

Permalink
frontend: migrate API projects namespace to flask-restx
Browse files Browse the repository at this point in the history
  • Loading branch information
nikromen committed Aug 17, 2023
1 parent 030dd32 commit 93bd0d7
Show file tree
Hide file tree
Showing 4 changed files with 368 additions and 165 deletions.
7 changes: 3 additions & 4 deletions frontend/coprs_frontend/coprs/views/apiv3_ns/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import json

import flask
import wtforms
import sqlalchemy
import inspect
from functools import wraps
from werkzeug.datastructures import ImmutableMultiDict, MultiDict
from werkzeug.exceptions import HTTPException, NotFound, GatewayTimeout
from sqlalchemy.orm.attributes import InstrumentedAttribute
from flask_restx import Api, Namespace, Resource
from coprs import app
from flask_restx import Api
from coprs.exceptions import (
AccessRestricted,
ActionInProgressException,
Expand Down Expand Up @@ -244,7 +243,7 @@ def wrapper(ownername, projectname, **kwargs):
'/'.join([ownername, projectname])
)
)
return f(copr, **kwargs)
return f(copr)
return wrapper


Expand Down
2 changes: 0 additions & 2 deletions frontend/coprs_frontend/coprs/views/apiv3_ns/apiv3_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
from .json2form import get_form_compatible_data




apiv3_builds_ns = Namespace("build", description="Builds")
api.add_namespace(apiv3_builds_ns)

Expand Down
Loading

0 comments on commit 93bd0d7

Please sign in to comment.