Merge branch '0.3' into #22

This commit is contained in:
Sven Heidemann 2022-12-18 11:02:07 +01:00
commit 5447d502cc
20 changed files with 44 additions and 59 deletions

View File

@ -16,22 +16,22 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core==2022.10.0.post9",
"cpl-core==2022.12.0",
"cpl-translation==2022.10.0.post2",
"cpl-query==2022.10.0.post2",
"cpl-discord==2022.10.0.post6",
"cpl-query==2022.12.2",
"cpl-discord==2022.12.0",
"Flask==2.2.2",
"Flask-Classful==0.14.2",
"Flask-Cors==3.0.10",
"PyJWT==2.6.0",
"waitress==2.1.2",
"Flask-SocketIO==5.3.1",
"eventlet==0.33.1",
"Flask-SocketIO==5.3.2",
"eventlet==0.33.2",
"requests-oauthlib==1.3.1",
"icmplib==3.0.3"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core==2022.10.0.post7"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -46,14 +46,14 @@ class AuthController:
@Route.authorize(role=AuthRoleEnum.admin)
async def get_all_users(self) -> Response:
result = await self._auth_service.get_all_auth_users_async()
return jsonify(result.select(lambda x: x.to_dict()))
return jsonify(result.select(lambda x: x.to_dict()).to_list())
@Route.post(f'{BasePath}/users/get/filtered')
@Route.authorize(role=AuthRoleEnum.admin)
async def get_filtered_users(self) -> Response:
dto: AuthUserSelectCriteria = JSONProcessor.process(AuthUserSelectCriteria, request.get_json(force=True, silent=True))
result = await self._auth_service.get_filtered_auth_users_async(dto)
result.result = result.result.select(lambda x: x.to_dict())
result.result = result.result.select(lambda x: x.to_dict()).to_list()
return jsonify(result.to_dict())
@Route.get(f'{BasePath}/users/get/<email>')

View File

@ -40,14 +40,14 @@ class ServerController:
@Route.authorize(role=AuthRoleEnum.admin)
async def get_all_servers(self) -> Response:
result = await self._discord_service.get_all_servers()
result = result.select(lambda x: x.to_dict())
result = result.select(lambda x: x.to_dict()).to_list()
return jsonify(result)
@Route.get(f'{BasePath}/get/servers-by-user')
@Route.authorize
async def get_all_servers_by_user(self) -> Response:
result = await self._discord_service.get_all_servers_by_user()
result = result.select(lambda x: x.to_dict())
result = result.select(lambda x: x.to_dict()).to_list()
return jsonify(result)
@Route.post(f'{BasePath}/get/filtered')
@ -55,11 +55,11 @@ class ServerController:
async def get_filtered_servers(self) -> Response:
dto: ServerSelectCriteria = JSONProcessor.process(ServerSelectCriteria, request.get_json(force=True, silent=True))
result = await self._discord_service.get_filtered_servers_async(dto)
result.result = result.result.select(lambda x: x.to_dict())
result.result = result.result.select(lambda x: x.to_dict()).to_list()
return jsonify(result.to_dict())
@Route.get(f'{BasePath}/get/<id>')
@Route.authorize
async def get_server_by_id(self, id: int) -> Response:
result = await self._discord_service.get_server_by_id_async(id)
result = await self._discord_service.get_server_by_id_async(id).to_list()
return jsonify(result.to_dict())

View File

@ -16,10 +16,10 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=0.3.dev70"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=0.3.dev70"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.10.0.post5"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.10.0.post2"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.10.0.post2"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=2022.10.0.post2"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.10.0.post7"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli>=2022.10.1"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -88,7 +88,7 @@ class LevelSeeder(DataSeederABC):
if levels.where(lambda l: l.name == role.name).count() == 0:
continue
new_position = position_above_levels - (levels.index(levels.where(lambda l: l.name == role.name).single()) + 1)
new_position = position_above_levels - (levels.index_of(levels.where(lambda l: l.name == role.name).single()) + 1)
if new_position <= 0:
new_position = 1
try:

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.10.0.post2"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.10.0.post7"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli>=2022.10.1"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2022.10.0.post7"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli>=2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.6",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core==2022.10.0.post7"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,10 +16,10 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=2022.10.0.post7"
"cpl-core==2022.12.0"
],
"DevDependencies": [
"cpl-cli>=2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -16,11 +16,11 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core==2022.10.0.post7",
"cpl-core==2022.12.0"
"GitPython==3.1.27"
],
"DevDependencies": [
"cpl-cli==2022.10.0"
"cpl-cli==2022.12.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -1,13 +0,0 @@
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { MembersComponent } from "./component/members/members.component";
const routes: Routes = [
{ path: '', component: MembersComponent },
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class MembersRoutingModule { }

View File

@ -1,11 +1,9 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ServerDashboardComponent } from './server-dashboard/server-dashboard.component';
import { AuthGuard } from "../../shared/guards/auth/auth.guard";
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { ServerDashboardComponent } from "./server-dashboard/server-dashboard.component";
const routes: Routes = [
{ path: '', component: ServerDashboardComponent },
{ path: 'members', loadChildren: () => import('./members/members.module').then(m => m.MembersModule), canActivate: [AuthGuard] },
];
@NgModule({