diff --git a/.env.local b/.env.local index b80d58a1..779fe91d 100644 --- a/.env.local +++ b/.env.local @@ -13,11 +13,11 @@ RELAYPATH = "dev-pedw-hc" //Test Oauth ESNR -CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1 -CLIENT_SECRET = IXI8Q~D5oqsC-nrtayHHc~tUAfjQFzNiKVQ~fc2S -RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/ -RELAYURI = "test-pedw-ns.servicebus.windows.net" -RELAYPATH = "test-pedw-hc" +//CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1 +//CLIENT_SECRET = IXI8Q~D5oqsC-nrtayHHc~tUAfjQFzNiKVQ~fc2S +//RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/ +//RELAYURI = "test-pedw-ns.servicebus.windows.net" +//RELAYPATH = "test-pedw-hc" //Preprod Oauth WGO @@ -44,13 +44,13 @@ SHOWREPRESENTATIONS = true SHOWFILEUPLOAD = "false" SHOWMAPS = "false" API_ROOT = "http://localhost:3000" -CY_API_ROOT ="http://cymru.local:3000" +CY_API_ROOT = "http://cymru.local:3000" I18N_DOMAIN = "cymru.local" -//Next Auth vars -NEXTAUTH_URL=$API_ROOT -NEXTAUTH_URL_INTERNAL=$API_ROOT +// Next Auth vars +NEXTAUTH_URL = $API_ROOT +NEXTAUTH_URL_INTERNAL = $API_ROOT NEXTAUTH_SECRET = SuperSecret DATABASE_URL = sqlserver://pedw-dev-test-sql-svr.database.windows.net:1433;database=PEDWDev;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword @@ -59,19 +59,21 @@ SECRET = SuperSecret //Azure Storage Account - AZURE_CLIENT_ID = $CLIENT_ID AZURE_TENANT_ID = $TENANT AZURE_CLIENT_SECRET = $CLIENT_SECRET -//AZURE_STORAGE_ACCOUNT_NAME= "pedwdev" -AZURE_STORAGE_ACCOUNT_NAME= "pedwtest" -// dev key -//AZURE_STORAGE_ACCOUNT_KEY = JS3ZIXianhYhB1lZrHB+bXbdzaLlON0alCyKrFAb+jVEwr9iqo2dty92EBxwnufNFM+CSN/fKX2R+AStDn0byg== -test key -AZURE_STORAGE_ACCOUNT_KEY = Dl8qUVEnR2mglklQorttMurmjUpe2lI3oMWl9V245U6BOLutXDwmpU36afeTrGLK+zfzNVLErsWM+AStiYsimw== -//AZURE_PEDW_STORAGE_ENDPOINT = https://pedwdev.blob.core.windows.net -AZURE_PEDW_STORAGE_ENDPOINT = https://pedwtest.blob.core.windows.net +// dev key +AZURE_STORAGE_ACCOUNT_NAME = "pedwdev" +AZURE_STORAGE_ACCOUNT_KEY = JS3ZIXianhYhB1lZrHB+bXbdzaLlON0alCyKrFAb+jVEwr9iqo2dty92EBxwnufNFM+CSN/fKX2R+AStDn0byg== +AZURE_PEDW_STORAGE_ENDPOINT = https://pedwdev.blob.core.windows.net + +// test key +//AZURE_STORAGE_ACCOUNT_NAME= "pedwtest" +//AZURE_STORAGE_ACCOUNT_KEY = Dl8qUVEnR2mglklQorttMurmjUpe2lI3oMWl9V245U6BOLutXDwmpU36afeTrGLK+zfzNVLErsWM+AStiYsimw== +//AZURE_PEDW_STORAGE_ENDPOINT = https://pedwtest.blob.core.windows.net + + AZURE_PEDW_CONTAINER = "pedwapplications" AZURE_PEDW_QUEUE_ENDPOINT = https://$AZURE_STORAGE_ACCOUNT_NAME.queue.core.windows.net diff --git a/.gitignore b/.gitignore index 47b6046b..cd33d7ba 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,10 @@ yarn-error.log* yarn.lock package-lock.json -tmp/ \ No newline at end of file +tmp + +*env*.sample +docker +dockerfile* +.dockerignore +Makefile \ No newline at end of file diff --git a/actions/azurestorage.js b/actions/azurestorage.js index 2e1ff561..c431c948 100644 --- a/actions/azurestorage.js +++ b/actions/azurestorage.js @@ -1008,24 +1008,39 @@ export const createCaseCompleteMessage = async ( const sasUrl = `${QUEUE_PATH}?${queueToken}`; const queueServiceClient = new QueueServiceClient(sasUrl); + const endpointURL = process.env.AZURE_PEDW_STORAGE_ENDPOINT; const message = { containerName: containerName, casepath: + endpointURL + + "/" + containerName + "/" + caseReference + "/" + caseReference + "_appeal.json", - casecontentpath: containerName + "/" + caseReference + "/case", - filespath: containerName + "/" + caseReference + "/files", + casecontentpath: + endpointURL + "/" + containerName + "/" + caseReference + "/case", + filespath: + endpointURL + "/" + containerName + "/" + caseReference + "/files", // uploadUrl: fileRecord.uploadUrl, // filename: fileRecord.file.name, // fileSize: fileRecord.file.size, }; + console.log( + "/////////////////////\n", + JSON.stringify( + `${JSON.stringify( + message + )}` + ), + "/////////////////////\n" + ); + const sendMessageResponse = await queueServiceClient .getQueueClient(whichQueue) .sendMessage( @@ -1048,12 +1063,14 @@ export const createRepCompleteMessage = async ( const sasUrl = `${QUEUE_PATH}?${queueToken}`; const queueServiceClient = new QueueServiceClient(sasUrl); + const endpointURL = process.env.AZURE_PEDW_STORAGE_ENDPOINT; const message = { containerName: containerName, caseref: caseReference, - reppath: containerName + "/" + caseReference + "/", - filespath: containerName + "/" + caseReference + "/files", + reppath: endpointURL + "/" + containerName + "/" + caseReference + "/", + filespath: + endpointURL + "/" + containerName + "/" + caseReference + "/files", }; const sendMessageResponse = await queueServiceClient diff --git a/components/newappeal/complete.js b/components/newappeal/complete.js index 72cea53c..3f8889e8 100644 --- a/components/newappeal/complete.js +++ b/components/newappeal/complete.js @@ -77,6 +77,7 @@ let CompleteAppeal = (props) => { props.props.accountDetails.loggedinUserId, props.appealType.appealTypeID, props.props.accountDetails.loggedinUserEmail, + props.props.accountDetails.containerID, ]); let { t } = useTranslation();