Skip to content

Commit

Permalink
add newSiteId to the body
Browse files Browse the repository at this point in the history
  • Loading branch information
dli85 committed Oct 21, 2024
1 parent 807f234 commit 280883f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend/src/site/site.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class SiteService {
console.log("Using new ID:" + siteModel.siteId.S)
try {
const result = await this.dynamoDbService.postItem(this.tableName, siteModel);
return result;
return {...result, newSiteId: newId.toString()};
} catch (e) {
throw new Error("Unable to post new site: " + e);
}
Expand Down Expand Up @@ -92,7 +92,7 @@ export class SiteService {

private PostInputToSiteModel = (input: NewSiteInput): SiteInputModel => {
return {
siteId: {S: "131"},
siteId: {S: ""},
siteName: {S: input.siteName},
siteStatus: {S: SiteStatus.AVAILABLE},
assetType: {S: input.assetType},
Expand Down

0 comments on commit 280883f

Please sign in to comment.