Skip to content

Commit

Permalink
fix-typedmodels-api
Browse files Browse the repository at this point in the history
changed titled

Fix Typed Model Service
Fix Typed Model Controller
Update README.md shell commands

Co-authored-by: Mihai Diaconeasa <[email protected]>

Merge-request: OPENPRA-MR-39
Merged-by: Arjun Earthperson <[email protected]>
  • Loading branch information
madiacon authored and Space committed Dec 17, 2023
1 parent a488e21 commit e1207cd
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 59 deletions.
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenPRA Monorepo
# OpenPRA MonoRepo

Welcome to the OpenPRA Monorepo, the unified codebase for
the [OpenPRA application suite](https://docs.openpra.org/).
Expand Down Expand Up @@ -214,17 +214,32 @@ packages, follow these general steps:
You can always use the command line to serve or build any of the targets. `nx`
supports a wide range of commands, so be
sure to check out its documentation. Some very basic examples include:
sure to check out its documentation.
Some very basic examples include:
- Serve packages concurrently
```shell
nx run-many -t serve --all
```
- Serve packages individually:
```shell
nx serve web-editor
```
```shell
nx serve web-backend
```
```shell
nx serve shared-types
```
# alternatively, serve all concurrently:
nx run-many -t serve --all
# run Jest unit tests and linting across the project with:
- Run Jest unit tests and linting across the project with:
```shell
nx run-many -t test
```
- Run ES linting across the project with:
```shell
nx run-many -t lint
```
Expand Down
10 changes: 5 additions & 5 deletions packages/web-backend/src/typedModel/typedModel.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import {
HttpStatus,
} from "@nestjs/common";
import { AuthGuard } from "@nestjs/passport";
import InternalEventsModel from "shared-types/src/lib/types/modelTypes/largeModels/internalEventsModel";
import ExternalEventsModel from "shared-types/src/lib/types/modelTypes/largeModels/externalHazardsModel";
import InternalHazardsModel from "shared-types/src/lib/types/modelTypes/largeModels/internalHazardsModel";
import FullScopeModel from "shared-types/src/lib/types/modelTypes/largeModels/fullScopeModel";
import {InternalEventsModel} from "shared-types/src/lib/types/modelTypes/largeModels/internalEventsModel";
import {InternalHazardsModel} from "shared-types/src/lib/types/modelTypes/largeModels/internalHazardsModel";
import {FullScopeModel} from "shared-types/src/lib/types/modelTypes/largeModels/fullScopeModel";
import {ExternalHazardsModel} from "shared-types/src/lib/types/modelTypes/largeModels/externalHazardsModel";
import { InvalidTokenFilter } from "../filters/invalid-token.filter";
import { TypedModelService } from "./typedModel.service";
import { InternalEvents } from "./schemas/internal-events.schema";
Expand Down Expand Up @@ -293,7 +293,7 @@ export class TypedModelController {
async deleteExternalHazard(
@Request() req,
@Query("modelId") modelId: string,
): Promise<ExternalEventsModel> {
): Promise<ExternalHazardsModel> {
return this.typedModelService.deleteExternalHazard(
Number(modelId),
req.user.user_id,
Expand Down
Loading

0 comments on commit e1207cd

Please sign in to comment.