Skip to content

Commit 2b7038c

Browse files
committed
Populate source_client with submission_portal from frontend
1 parent 859b483 commit 2b7038c

File tree

1 file changed

+8
-1
lines changed
  • web/src/views/SubmissionPortal/store

1 file changed

+8
-1
lines changed

web/src/views/SubmissionPortal/store/api.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { AxiosResponse } from 'axios';
12
import { client, SearchParams, User } from '@/data/api';
23
import { HARMONIZER_TEMPLATES } from '../harmonizerApi';
34

@@ -45,6 +46,7 @@ interface MetadataSubmissionRecord {
4546
locked_by: User;
4647
lock_updated: string;
4748
permission_level: string | null;
49+
source_client: 'submission_portal' | 'field_notes' | null;
4850
}
4951

5052
interface PaginatedResponse<T> {
@@ -53,8 +55,13 @@ interface PaginatedResponse<T> {
5355
}
5456

5557
async function createRecord(record: MetadataSubmission) {
56-
const resp = await client.post<MetadataSubmissionRecord>('metadata_submission', {
58+
const resp = await client.post<
59+
MetadataSubmissionRecord,
60+
AxiosResponse<MetadataSubmissionRecord>,
61+
Partial<MetadataSubmissionRecord>
62+
>('metadata_submission', {
5763
metadata_submission: record,
64+
source_client: 'submission_portal',
5865
});
5966
return resp.data;
6067
}

0 commit comments

Comments
 (0)