Skip to content

Commit

Permalink
simplify CreationPage POST object (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
Torgeir333 authored Jan 8, 2024
1 parent bbd8cd9 commit 2cb599c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"p":"7dWki93s51TpUvdr_nWlzOIuau88fGpy0TdQsckiC4OAkEKPUtwR1Fs1jsPiI3ntnhqUu8LMx_6p8S3RWOACMugHpJ9OWGOGOJ-8dyI9241Um-DXww9eZqe-NzeLxYWK6PDKpxNjrYfzR3xgNIAYWdyZWhxunD5Aj_X_-gvhkmU","kty":"RSA","q":"lz30vjxrUIpuzP4imFab1N_ABO3VDZ4IDyZNOiLPr4fcpkCZooXb9iSI1cycdCBY_UMWXLAWD6kEsGMTKjJV6gnNcNgIPhW2Xcpsfzk5FHkeYDTHi5YIZR1xF-o2mtkchkGtKokY2DeB0kdLuw1YcDcVTfP7gqokJQRdQhS1jEc","d":"Sz7B2Kda1LCDs5Fb1PmYANdiRx7bbLzJL3wiqF6uN8ToH0JK_c0J08l0mHveT4HdQ8Wkhp_HcdvMJUTxTdz38Ln4N33_yMRP-ARqP1DzvXZoH-_JMb_AjJ7ukYU1kEpAFNccqSTjR-Ny9eq6lcf41dL9yC79foLVnvPwFXzkPnefCmaqZk5K3LQ90ISL9F9sBLxG5zVgJAiYWZTIckaZrM1KBRQVFd2CrSN_Lu-_4C1BHr7ztOE2SgNbQO3Of6xq-uuW4xtiySIxKopLZZq-DzEt2_v5yvg93lsfejMvQe_o3UDVbvTsUntCdI9s83v03sVw-YakdbXSxlngNG5IQQ","e":"AQAB","use":"enc","kid":"77ecac2f-308b-4cbc-807d-0f7fde6fa7ba","qi":"dihwGq6AjV4wzdWIDHONM6x2t_vfCkeTGu4-2fTKaZg9bbn-5rxmC9HWC2nQ2x7QCy78hAl887UWgKHZyvfFLn5IdqTmLAAKQTOdg1C1vTCoQ0lq2rFEat8AyrloAxqWVsmRWcJAP-R6_I494Mq9L_FdYQWmQzHnVeem9OW1keQ","dp":"CLs9LT1agyuk3TzkJBVhnuH23komKFMoH_It7jj6HP4Y7DLlXB9kMC2hC7q5RKAnTxSevT3rkrQQvR_3fZHLwt6t2SdYEvqkZNPIcX86UiMgJhDdGvYnexFRdGl_oiLC9MZSSkv17tr83XT9ey_wtOvaXWqJzQakDCT13tIs19k","dq":"VRRKUJXmfKlTSUgRKAdYpDi2aU9tUbq7p-IRAYpBsOnJy1B93LpWkbHds__lZ0InLVmHA98emfKnq54gUtV8FSssgbVVda97JmnP_QWwwX6dAtvOAQ0GbfNRAnYD_7nw3OmnQ01aR496HVN0G6aXQJEMEA0XSFrz-ErrN1g1BNM","n":"jIKTVxLB0uqlLBgnfmBhD5N74Ae4qLQf1Y6TM8UcO21p05wsHdG47jnU8t-pt_3-DpwZiCv8KRrjAXd_wgPkykUKOP_C5OUplG1BcTsEtxKn3378r1yCGn0xbeiX4LiEzr4-6GC5qN4s4mXF_-blyGqUxKFVHt8tPNEEj-Ekq8VHs-GRKAEpigYY3-y_PnrwRjj7Wwc0q9Gfbu1bQTFdlfKmRyhy-ZxGK8I3pkC6YZfJfrKGPbPy3yFzygd2RhE7Zpa3Y79vWdHuzCl49AweI57naAgnTsKm0mFNiWpyfzWp_1y0JA97eSM1EqN8RAmfJefXf6KI2jre2THPDQfWAw"}
5 changes: 2 additions & 3 deletions frontend/src/features/creationpage/CreationPageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ export const CreationPageContent = () => {

const handleConfirm = () => {
// POST 3 useState variables, while the last two not yet implemented
// Update 08.01.24: agreement with Simen-backend that only two
// key:value pairs are needed
const PostObjekt: CreationRequest = {
integrationTitle: integrationName,
description: descriptionEntered,
selectedSystemType: selectedSystemType,
clientId: "notImplemented",
ownedByPartyId: "notImplemented"
};

void dispatch(postNewSystemUser(PostObjekt));
Expand Down
11 changes: 4 additions & 7 deletions frontend/src/rtk/features/creationPage/creationPageSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import axios from 'axios';

// FIX-ME: muligens omskrives slik at navn, beskrivelse og selected
// blir tilgjengelig/dispatch i det fokus mistes, a la MaskinportenPage
// Foreløpig er det useState Local State som bærer de 3 tilgjengelige verdiene
// Foreløpig er det useState Local State som bærer de tilgjengelige verdiene
// som blir sendt til BFF

export interface SystemRegisterObjectDTO {
Expand Down Expand Up @@ -35,13 +35,10 @@ const initialState: SliceState = {
postConfirmationId: '',
};

// CreationRequest form is based on Swagger POST description per 25.10.23
// Update 08.01.23: CreationRequest form is simplified to two key:value pairs
export interface CreationRequest {
integrationTitle: string,
description: string,
selectedSystemType: string,
clientId: string,
ownedByPartyId: string
}

export const fetchSystemRegisterVendors = createAsyncThunk('creation/fetchCreationPageSlice', async () => {
Expand All @@ -55,8 +52,8 @@ export const fetchSystemRegisterVendors = createAsyncThunk('creation/fetchCreati
});


// OK let the CreationPage populate the systemUserInfo object,
// and just accept the object as input here and post parameter on to BFF
// The CreationPage populate the systemUserInfo object,
// The object is here just input and is posted on to BFF
export const postNewSystemUser = createAsyncThunk('creationPageSlice/postNewSystemUser',
async (systemUserInfo: CreationRequest) => {
return await axios
Expand Down

0 comments on commit 2cb599c

Please sign in to comment.