From e41b9feab8ae483fa13a44e322df07bebf3948b1 Mon Sep 17 00:00:00 2001
From: Roosted7 <thomasroos@live.nl>
Date: Thu, 8 Mar 2018 22:12:36 +0100
Subject: [PATCH] Use only camelCase in frontend

---
 client/views/Students.js    | 10 +++++-----
 zesje/resources/students.py |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/client/views/Students.js b/client/views/Students.js
index 389b15880..4db09d4c3 100644
--- a/client/views/Students.js
+++ b/client/views/Students.js
@@ -17,7 +17,7 @@ const StudentPanelBlock = (props) => {
 				<span className={"panel-icon" + (props.selected ? " has-text-white" : "")}>
 					<i className="fa fa-user"></i>
 				</span>
-				{props.student.first_name + ' ' + props.student.last_name}
+				{props.student.firstName + ' ' + props.student.lastName}
 			</a>
 
 			<div className={"panel-block" + (props.selected ? " is-info" : " is-hidden")}
@@ -84,8 +84,8 @@ class CheckStudents extends React.Component {
 	students = [
 		{
 			id: 0,
-			first_name: "",
-			last_name: "",
+			firstName: "",
+			lastName: "",
 			email: ""
 		}
 	];
@@ -217,8 +217,8 @@ class CheckStudents extends React.Component {
 			minMatchCharLength: 1,
 			keys: [
 				"id",
-				"first_name",
-				"last_name"
+				"firstName",
+				"lastName"
 			]
 		};
 		var fuse = new Fuse(this.students, options);
diff --git a/zesje/resources/students.py b/zesje/resources/students.py
index 24aa37ea4..77563d6e4 100644
--- a/zesje/resources/students.py
+++ b/zesje/resources/students.py
@@ -21,8 +21,8 @@ class Students(Resource):
         return [
             {
                 'id': s.id,
-                'first_name': s.first_name,
-                'last_name': s.last_name,
+                'firstName': s.first_name,
+                'lastName': s.last_name,
                 'email': s.email,
             }
             for s in Student.select()
-- 
GitLab