Compare commits

..

No commits in common. "d933cae73c33ee786a0a87fc51a553406ee7510b" and "49d9509255bbf0747e9f7511e80f070fcbe839eb" have entirely different histories.

5 changed files with 6 additions and 14 deletions

View File

@ -1,4 +1,3 @@
import enum
from inspect import signature, Parameter from inspect import signature, Parameter
from cpl_core.utils import String from cpl_core.utils import String
@ -29,9 +28,6 @@ class JSONProcessor:
if isinstance(value, dict): if isinstance(value, dict):
value = JSONProcessor.process(parameter.annotation, value) value = JSONProcessor.process(parameter.annotation, value)
if issubclass(parameter.annotation, enum.Enum):
value = parameter.annotation(value)
args.append(value) args.append(value)
elif parameter.default != Parameter.empty: elif parameter.default != Parameter.empty:

View File

@ -85,7 +85,7 @@ class AuthUserDTO(DtoABC):
self._email = values['email'] self._email = values['email']
self._password = values['password'] self._password = values['password']
self._is_confirmed = values['isConfirmed'] self._is_confirmed = values['isConfirmed']
self._auth_role = AuthRoleEnum(values['authRole']) self._auth_role = values['authRole']
def to_dict(self) -> dict: def to_dict(self) -> dict:
return { return {

View File

@ -33,8 +33,8 @@ class UpdateAuthUserDTO(DtoABC):
return self._change_password return self._change_password
def from_dict(self, values: dict): def from_dict(self, values: dict):
self._auth_user = AuthUserDTO().from_dict(values['authUser']) self._auth_user = values['authUser']
self._new_auth_user = AuthUserDTO().from_dict(values['newAuthUser']) self._new_auth_user = values['newAuthUser']
self._change_password = False if 'changePassword' not in values else bool(values['changePassword']) self._change_password = False if 'changePassword' not in values else bool(values['changePassword'])
def to_dict(self) -> dict: def to_dict(self) -> dict:

View File

@ -1,9 +1,9 @@
{ {
"name": "kdb-web", "name": "kdb-web",
"version": "0.3.0", "version": "0.3.dev70",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"update-version": "ts-node-esm update-version.ts", "update-version": "ts-node -O '{\"module\": \"commonjs\"}' update-version.ts",
"prestart": "npm run update-version", "prestart": "npm run update-version",
"start": "ng serve", "start": "ng serve",
"prebuild": "npm run update-version", "prebuild": "npm run update-version",
@ -48,6 +48,7 @@
"karma-coverage": "~2.2.0", "karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.0", "karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "~1.7.0", "karma-jasmine-html-reporter": "~1.7.0",
"ts-node": "~8.3.0",
"typescript": "~4.7.2" "typescript": "~4.7.2"
} }
} }

View File

@ -1,10 +1,5 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */ /* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"ts-node": {
"compilerOptions": {
"module": "CommonJS"
}
},
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "./",