Added fix in api
This commit is contained in:
parent
56f4361929
commit
802fccc162
5 changed files with 54 additions and 10 deletions
|
|
@ -17,7 +17,7 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from flask import g, session, redirect, url_for
|
||||
from flask import g, session, redirect, url_for, request, abort
|
||||
from functools import wraps
|
||||
from paramecio2.libraries.db.webmodel import WebModel
|
||||
|
||||
|
|
@ -46,7 +46,8 @@ def auth_plugin(f):
|
|||
#print(request.headers['Authorization'])
|
||||
bearer=request.headers['Authorization'].replace('Bearer', '').strip()
|
||||
|
||||
db=kwargs['db']
|
||||
#db=kwargs['db']
|
||||
db=g.connection
|
||||
|
||||
num_token=0
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,12 @@ class ConfigTask:
|
|||
self.api_key=''
|
||||
|
||||
self.ssh_directory=os.path.expanduser('~')+'/.ssh'
|
||||
|
||||
self.ssh_private_key=self.ssh_directory+'/id_rsa'
|
||||
|
||||
self.ssh_private_key_password=''
|
||||
|
||||
self.ssh_public_key=self.ssh_private_key+'.pub'
|
||||
|
||||
# Class for global configuration
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue