🎨 Fjernet ubrukte logs, rettet grammatikk, fikset typing på aktorid frontend
Co-authored-by: Amalie Mansåker <amalie.erdal.mansaker@nav.no>
This commit is contained in:
		
							parent
							
								
									125b86806d
								
							
						
					
					
						commit
						bbebc37226
					
				
					 3 changed files with 4 additions and 8 deletions
				
			
		|  | @ -68,7 +68,6 @@ fun configureRouting(): ApplicationEngine = embeddedServer(CIO, applicationEngin | |||
|             } | ||||
|             put("/api/oppdaterfeil") { | ||||
|                 val oppdatertFeilmelding = call.receive<Feilmelding>() | ||||
|                 println(oppdatertFeilmelding) | ||||
|                 feilmeldingRepository.oppdaterFeilmelding(oppdatertFeilmelding) | ||||
|                 call.respond(status = HttpStatusCode.Created, message = "Feilmelding oppdatert") | ||||
|             } | ||||
|  |  | |||
|  | @ -18,13 +18,10 @@ export default function Home() { | |||
|    * Henter alle feilmeldinger fra backend. | ||||
|    * Bruker endepunktet /api/hentallefeil. | ||||
|    */   | ||||
|   const hentAlleFeil = async () => { | ||||
|     console.log("hentAlleFeil"); | ||||
|      | ||||
|   const hentAlleFeil = async () => {     | ||||
|     await axios.get("/api/hentallefeil") | ||||
|       .then(data => data.data) | ||||
|       .then(feil => { | ||||
|         feil.map((f: any) => console.log(f)) | ||||
|         setFeilmeldinger( | ||||
|           feil.map((jsonFeilmelding: any) => new Feilmelding(jsonFeilmelding)) | ||||
|         ); | ||||
|  |  | |||
|  | @ -15,7 +15,7 @@ export default function Feil() { | |||
|     const [status, setStatus] = useState(0) | ||||
|     const [haster, setHaster] = useState(false) | ||||
|     const [valgteTags, setValgteTags] = useState([] as string[]); | ||||
|     const [aktorid, setAktorid] = useState(0); | ||||
|     const [aktorid, setAktorid] = useState<number|null>(null); | ||||
|      | ||||
|     const handleSubmit = () => { | ||||
|         const payload = { | ||||
|  | @ -113,8 +113,8 @@ export default function Feil() { | |||
| 
 | ||||
|                         <Skillelinje/> | ||||
|                         <TextField | ||||
|                             label="aktor-ID (valgfritt)" | ||||
|                             description="Legg ved aktor-ID om det er relevant" | ||||
|                             label="Aktør-ID (valgfritt)" | ||||
|                             description="Legg ved aktør-ID om det er relevant" | ||||
|                             onChange={e => setAktorid(parseInt(e.target.value))} | ||||
|                         /> | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue
	
	 Markus Johansen
						Markus Johansen