From d4c84aff90dc5920a69ee3e18003b45451ffd635 Mon Sep 17 00:00:00 2001
From: odinkh <odinkh@stud.ntnu.no>
Date: Thu, 19 May 2022 15:21:22 +0200
Subject: [PATCH] Output of tags and content in different languages bug fix

---
 threat-total/src/components/source.js | 2 +-
 utils/validation.go                   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/threat-total/src/components/source.js b/threat-total/src/components/source.js
index 031d211..ff21a7e 100644
--- a/threat-total/src/components/source.js
+++ b/threat-total/src/components/source.js
@@ -57,7 +57,7 @@ if (props.Data === "") {
                 </div>
             </div>
             <div className="">
-                <p>Tags: {props.Data.en.tags}</p>
+                <p>Tags: {t("tags")}</p>
                 <p>{t("shortForm")} {t("content")}</p>
             </div>   
         </div>
diff --git a/utils/validation.go b/utils/validation.go
index 144cce1..48f145e 100644
--- a/utils/validation.go
+++ b/utils/validation.go
@@ -156,7 +156,7 @@ func SetResponseObjectAlienVaultHash(jsonResponse AlienVaultHash, response *Fron
 		response.EN.Status = "Safe"
 		response.EN.Content = "We have no information indicating that this file is malicious."
 
-		response.NO.Content = "Trygg"
+		response.NO.Status = "Trygg"
 		response.NO.Content = "Vi har ingen informasjon som tyder på at dette er en ondsinnet fil."
 	} else {
 		response.EN.Status = "Risk"
@@ -197,11 +197,11 @@ func SetResponseObjectHybridAnalysisHash(jsonResponse HybridAnalysishash, respon
 			response.NO.Status = "Trygg"
 			response.NO.Content = "I henhold til informasjon gitt av HybridAnalysis tilsier ikke denne filen noen trussel."
 		} else {
-			response.EN.Status = "Unknown" //Denne må byttes til at den er ukjent // grå farge elns på frontend.
+			response.EN.Status = "Unknown"
 			response.EN.Content = "This file hash is not known to Hybrid Analysis."
 
 			response.NO.Status = "Ukjent"
-			response.NO.Status = "Denne filhashen er ukjent for Hybrid Analysis."
+			response.NO.Content = "Denne filhashen er ukjent for Hybrid Analysis."
 		}
 		fmt.Println(jsonResponse[0].Verdict)
 		// Set the filename field if known
-- 
GitLab