diff --git a/README.md b/README.md index 16b8047..02aedbf 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Acces Management System of Colsys: [Product info](http://produkty.colsys.cz/coln ## Endpoints -1. POST request - `/AaaManager/authSession` - to login, return JSON with token -2. `/SubjectManager/getSubjects` - get subjects -3. `/TokenManager/getTokens` - get tokens -4. `/TokenManager/setTokens` - set tokens +1. POST request - `/AaaManager/authSession` - to login, return JSON with Auth token +2. GET request - `/SubjectManager/getSubjects` - get subjects +3. GET request - `/TokenManager/getTokens` - get tokens +4. POST request - `/TokenManager/setTokens` - set tokens diff --git a/colnod-connector.pro b/colnod-connector.pro index a0e3fda..41bdb50 100644 --- a/colnod-connector.pro +++ b/colnod-connector.pro @@ -1,23 +1,5 @@ -QT -= gui +TEMPLATE = subdirs -CONFIG += c++11 console -CONFIG -= app_bundle - -# The following define makes your compiler emit warnings if you use -# any Qt feature that has been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target +SUBDIRS += \ + src/app \ + test diff --git a/src/app/app.pro b/src/app/app.pro new file mode 100644 index 0000000..619e67b --- /dev/null +++ b/src/app/app.pro @@ -0,0 +1,8 @@ +TEMPLATE = app + +QT += core sql network +CONFIG += debug console + +SOURCES += main.cpp + +include(../colnod/colnod.pri) diff --git a/src/colnod/colnod.pri b/src/colnod/colnod.pri new file mode 100644 index 0000000..0e9925b --- /dev/null +++ b/src/colnod/colnod.pri @@ -0,0 +1,9 @@ +INCLUDEPATH += $$PWD +#SRC_DIR = $$PWD +message($$PWD) +SOURCES += \ + $$PWD/requestmanager.cpp + +HEADERS += \ + $$PWD/requestmanager.h +message($$SOURCES) diff --git a/src/config.json b/src/config.json new file mode 100644 index 0000000..7ac48e0 --- /dev/null +++ b/src/config.json @@ -0,0 +1,5 @@ +{ + "host": "https://localhost:8080", + "username": "spaceti", + "password": "SuperSecretPassword" +} \ No newline at end of file diff --git a/test/test.pro b/test/test.pro new file mode 100644 index 0000000..13debd0 --- /dev/null +++ b/test/test.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs + +SUBDIRS += \ + unitTests + diff --git a/test/unitTests/config.json b/test/unitTests/config.json new file mode 100644 index 0000000..7ac48e0 --- /dev/null +++ b/test/unitTests/config.json @@ -0,0 +1,5 @@ +{ + "host": "https://localhost:8080", + "username": "spaceti", + "password": "SuperSecretPassword" +} \ No newline at end of file diff --git a/test/unitTests/unitTests.pro b/test/unitTests/unitTests.pro new file mode 100644 index 0000000..b8f8c78 --- /dev/null +++ b/test/unitTests/unitTests.pro @@ -0,0 +1,14 @@ +QT -= gui +QT += core sql network testlib + +HEADERS += \ + unittest.h +SOURCES += \ + unittest.cpp + +include(../../src/colnod/colnod.pri) + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target