Skip to content

Commit

Permalink
Update editAccountRequest parameter type to AccountRequestUpdateRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
Stain19 committed Apr 20, 2024
1 parent 0a0e7c9 commit b93e228
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { AccountService } from '../../../services/account.service';
import { SimpleModalService } from '../../../services/simple-modal.service';
import { StatusMessageService } from '../../../services/status-message.service';
import { AccountRequest, MessageOutput } from '../../../types/api-output';
import { AccountRequestUpdateRequest } from '../../../types/api-request';
import { ErrorMessageOutput } from '../../error-message-output';
import { SimpleModalType } from '../simple-modal/simple-modal-type';
import { collapseAnim } from '../teammates-common/collapse-anim';
Expand Down Expand Up @@ -70,11 +71,13 @@ export class AccountRequestTableComponent {
modalRef.result.then((res: EditRequestModalComponentResult) => {
this.accountService.editAccountRequest(
accountRequest.id,
res.accountRequestName,
res.accountRequestEmail,
res.accountRequestInstitution,
accountRequest.status,
res.accountRequestComment)
<AccountRequestUpdateRequest>({
name :res.accountRequestName,

Check failure on line 75 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Extra space after key 'name'

Check failure on line 75 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Missing space before value for key 'name'

Check failure on line 75 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Extra space after key 'name'

Check failure on line 75 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Missing space before value for key 'name'
email :res.accountRequestEmail,

Check failure on line 76 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Extra space after key 'email'

Check failure on line 76 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Missing space before value for key 'email'

Check failure on line 76 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Extra space after key 'email'

Check failure on line 76 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Missing space before value for key 'email'
institute :res.accountRequestInstitution,

Check failure on line 77 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Extra space after key 'institute'

Check failure on line 77 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Missing space before value for key 'institute'

Check failure on line 77 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Extra space after key 'institute'

Check failure on line 77 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Missing space before value for key 'institute'
status :accountRequest.status,

Check failure on line 78 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Extra space after key 'status'

Check failure on line 78 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Missing space before value for key 'status'

Check failure on line 78 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Extra space after key 'status'

Check failure on line 78 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Missing space before value for key 'status'
comments :res.accountRequestComment})

Check failure on line 79 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Extra space after key 'comments'

Check failure on line 79 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Missing space before value for key 'comments'

Check failure on line 79 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Extra space after key 'comments'

Check failure on line 79 in src/web/app/components/account-requests-table/account-request-table.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Missing space before value for key 'comments'
)
.subscribe({
next: (resp: AccountRequest) => {
accountRequest.comments = resp.comments ?? '';
Expand Down
11 changes: 1 addition & 10 deletions src/web/services/account.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,11 @@ export class AccountService {
/**
* Edits an account request by calling API.
*/
editAccountRequest(id: string, name: string, email: string, institute: string,
status: AccountRequestStatus, comments: string)
editAccountRequest(id: string, accountReqUpdateRequest: AccountRequestUpdateRequest)
: Observable<AccountRequest> {
const paramMap: Record<string, string> = {
id,
};
const accountReqUpdateRequest : AccountRequestUpdateRequest = {
name,
email,
institute,
status,
comments,
};

return this.httpRequestService.put(ResourceEndpoints.ACCOUNT_REQUEST, paramMap, accountReqUpdateRequest);
}

Expand Down

0 comments on commit b93e228

Please sign in to comment.