Skip to content

Commit

Permalink
Deploying to gh-pages from @ 1a00500 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchuhmacher committed Sep 7, 2023
1 parent 089ea10 commit 2c5a188
Show file tree
Hide file tree
Showing 95 changed files with 3,013 additions and 2,615 deletions.
27 changes: 14 additions & 13 deletions classes/SubmissionItemResponse.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h6><b>Properties</b></h6>
</li>
<li>
<span class="modifier"></span>
<a href="#userId" >userId</a>
<a href="#userData" >userData</a>
</li>
</ul>
</td>
Expand All @@ -128,7 +128,7 @@ <h3 id="constructor">Constructor</h3>
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="4" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:4</a></div>
<div class="io-line">Defined in <a href="" data-line="5" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:5</a></div>
</td>
</tr>

Expand Down Expand Up @@ -199,7 +199,7 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="19" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:19</a></div>
<div class="io-line">Defined in <a href="" data-line="20" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:20</a></div>
</td>
</tr>

Expand Down Expand Up @@ -235,7 +235,7 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="13" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:13</a></div>
<div class="io-line">Defined in <a href="" data-line="14" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:14</a></div>
</td>
</tr>

Expand Down Expand Up @@ -271,7 +271,7 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="16" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:16</a></div>
<div class="io-line">Defined in <a href="" data-line="17" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:17</a></div>
</td>
</tr>

Expand All @@ -282,17 +282,17 @@ <h3 id="inputs">
<tbody>
<tr>
<td class="col-md-4">
<a name="userId"></a>
<a name="userData"></a>
<span class="name">
<span class="modifier"></span>
<span ><b>userId</b></span>
<a href="#userId"><span class="icon ion-ios-link"></span></a>
<span ><b>userData</b></span>
<a href="#userData"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
<i>Type : </i> <code><a href="../classes/UserDataResponse.html" target="_self" >UserDataResponse</a></code>

</td>
</tr>
Expand All @@ -307,7 +307,7 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="22" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:22</a></div>
<div class="io-line">Defined in <a href="" data-line="23" class="link-to-prism">apps/server/src/modules/board/controller/dto/submission-item/submission-item.response.ts:23</a></div>
</td>
</tr>

Expand All @@ -328,13 +328,14 @@ <h3 id="inputs">
<div class="tab-pane fade tab-source-code" id="source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { ApiProperty } from &#x27;@nestjs/swagger&#x27;;
import { TimestampsResponse } from &#x27;../timestamps.response&#x27;;
import { UserDataResponse } from &#x27;../user-data.response&#x27;;

export class SubmissionItemResponse {
constructor({ id, timestamps, completed, userId }: SubmissionItemResponse) {
constructor({ id, timestamps, completed, userData }: SubmissionItemResponse) {
this.id &#x3D; id;
this.timestamps &#x3D; timestamps;
this.completed &#x3D; completed;
this.userId &#x3D; userId;
this.userData &#x3D; userData;
}

@ApiProperty({ pattern: &#x27;[a-f0-9]{24}&#x27; })
Expand All @@ -347,7 +348,7 @@ <h3 id="inputs">
completed: boolean;

@ApiProperty()
userId: string;
userData: UserDataResponse;
}
</code></pre>
</div>
Expand Down
11 changes: 8 additions & 3 deletions classes/SubmissionItemResponseMapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ <h3 id="methods">

<div class="tab-pane fade tab-source-code" id="source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { SubmissionItem } from &#x27;@shared/domain&#x27;;
import { SubmissionItemResponse, TimestampsResponse } from &#x27;../dto&#x27;;
import { SubmissionItemResponse, TimestampsResponse, UserDataResponse } from &#x27;../dto&#x27;;

export class SubmissionItemResponseMapper {
private static instance: SubmissionItemResponseMapper;
Expand All @@ -302,13 +302,18 @@ <h3 id="methods">

public mapToResponse(submissionItem: SubmissionItem): SubmissionItemResponse {
const result &#x3D; new SubmissionItemResponse({
completed: submissionItem.completed,
id: submissionItem.id,
timestamps: new TimestampsResponse({
lastUpdatedAt: submissionItem.updatedAt,
createdAt: submissionItem.createdAt,
}),
completed: submissionItem.completed,
userId: submissionItem.userId,
userData: new UserDataResponse({
// TODO: put valid user info here which comes from the submission owner
firstName: &#x27;John&#x27;,
lastName: &#x27;Mr Doe&#x27;,
userId: submissionItem.userId,
}),
});

return result;
Expand Down
Loading

0 comments on commit 2c5a188

Please sign in to comment.