Bladeren bron

added 2 columns to the user table

dmr1725 4 jaren geleden
bovenliggende
commit
430cdce3b4

+ 2
- 2
client/App.js Bestand weergeven

@@ -39,7 +39,7 @@ export default function App() {
39 39
 
40 40
         try {
41 41
           // login user in backend
42
-          let response = await fetch('http://356b92b5f6b5.ngrok.io/rest-auth/google/', {
42
+          let response = await fetch('http://8c4029a33a9a.ngrok.io/rest-auth/google/', {
43 43
             method: 'POST',
44 44
             headers: {
45 45
               'content-type': 'application/json'
@@ -60,7 +60,7 @@ export default function App() {
60 60
           const token = await SecureStore.getItemAsync('token')
61 61
 
62 62
           // storing our id
63
-          let id = await fetch('http://356b92b5f6b5.ngrok.io/api/get_user_id', {
63
+          let id = await fetch('http://8c4029a33a9a.ngrok.io/api/get_user_id', {
64 64
             method: 'GET',
65 65
             headers: {
66 66
               'content-type': 'application/json',

+ 2
- 2
client/Screens/AddTakenCourse.js Bestand weergeven

@@ -51,7 +51,7 @@ const AddTakenCourse = () => {
51 51
 
52 52
       let response = await axios({
53 53
         method: 'POST',
54
-        url: 'http://356b92b5f6b5.ngrok.io/api/add_taken_course',
54
+        url: 'http://8c4029a33a9a.ngrok.io/api/add_taken_course',
55 55
         headers: {
56 56
           'content-type': 'application/json',
57 57
           Authorization: `Token ${token}`
@@ -85,7 +85,7 @@ const AddTakenCourse = () => {
85 85
       const token = await SecureStore.getItemAsync('token')
86 86
       const response = await axios({
87 87
           method: 'GET',
88
-          url: `http://356b92b5f6b5.ngrok.io/api/find_course?code=${text}`,
88
+          url: `http://8c4029a33a9a.ngrok.io/api/find_course?code=${text}`,
89 89
           headers: {
90 90
             'content-type': 'application/json',
91 91
             Authorization: `Token ${token}`

+ 1
- 1
client/Screens/HomeScreen.js Bestand weergeven

@@ -13,7 +13,7 @@ function HomeScreen({ navigation }) {
13 13
     console.log(token, id)
14 14
 
15 15
     let response = await Axios({
16
-      url: 'http://356b92b5f6b5.ngrok.io/api/hello',
16
+      url: 'http://8c4029a33a9a.ngrok.io/api/hello',
17 17
       method: 'GET',
18 18
       headers: {
19 19
           Authorization: `Token ${token}`

+ 2
- 2
client/Screens/MyCurriculum.js Bestand weergeven

@@ -20,7 +20,7 @@ const MyCurriculum = () =>{
20 20
         let user_id = parseInt(id)
21 21
 
22 22
         try {
23
-            let response = await axios('http://356b92b5f6b5.ngrok.io/api/see_gpa', {
23
+            let response = await axios('http://8c4029a33a9a.ngrok.io/api/see_gpa', {
24 24
                 method: 'POST',
25 25
                 headers: {
26 26
                     Authorization: `Token ${token}`
@@ -43,7 +43,7 @@ const MyCurriculum = () =>{
43 43
         let numbers = []
44 44
 
45 45
         try {
46
-            let response = await axios(`http://356b92b5f6b5.ngrok.io/api/get_all_courses_by_semester?user_id=${user_id}&year=${year}&semestre=${semester}`, {
46
+            let response = await axios(`http://8c4029a33a9a.ngrok.io/api/get_all_courses_by_semester?user_id=${user_id}&year=${year}&semestre=${semester}`, {
47 47
                 method: 'GET',
48 48
                 headers: {
49 49
                     'content-type': 'application/json',

+ 2
- 2
client/Screens/SettingScreen.js Bestand weergeven

@@ -15,7 +15,7 @@ export default function SettingScreen() {
15 15
         let user_id = parseInt(id)
16 16
 
17 17
        try {
18
-        let response = await axios(`http://356b92b5f6b5.ngrok.io/api/get_faculty_name?id=${user_id}`, {
18
+        let response = await axios(`http://8c4029a33a9a.ngrok.io/api/get_faculty_name?id=${user_id}`, {
19 19
             method: 'GET',
20 20
             headers: {
21 21
                 'content-type': 'application/json',
@@ -43,7 +43,7 @@ export default function SettingScreen() {
43 43
         try {
44 44
             let response = await axios({
45 45
                 method: 'PATCH',
46
-                url: 'http://356b92b5f6b5.ngrok.io/api/update_faculty',
46
+                url: 'http://8c4029a33a9a.ngrok.io/api/update_faculty',
47 47
                 headers: {
48 48
                     Authorization: `Token ${token}`
49 49
                 },

+ 1
- 0
client/debug.log Bestand weergeven

@@ -0,0 +1 @@
1
+[1130/124344.155:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)

BIN
server/CompanionApp/__pycache__/models.cpython-38.pyc Bestand weergeven


+ 23
- 0
server/CompanionApp/migrations/0011_auto_20201207_0948.py Bestand weergeven

@@ -0,0 +1,23 @@
1
+# Generated by Django 3.0.8 on 2020-12-07 13:48
2
+
3
+from django.db import migrations, models
4
+
5
+
6
+class Migration(migrations.Migration):
7
+
8
+    dependencies = [
9
+        ('CompanionApp', '0010_user_credits_taken_score'),
10
+    ]
11
+
12
+    operations = [
13
+        migrations.AddField(
14
+            model_name='user',
15
+            name='current_semester',
16
+            field=models.IntegerField(default=1),
17
+        ),
18
+        migrations.AddField(
19
+            model_name='user',
20
+            name='current_year',
21
+            field=models.IntegerField(default=1),
22
+        ),
23
+    ]

BIN
server/CompanionApp/migrations/__pycache__/0011_auto_20201207_0948.cpython-38.pyc Bestand weergeven


+ 2
- 0
server/CompanionApp/models.py Bestand weergeven

@@ -17,6 +17,8 @@ class User(AbstractUser):
17 17
     fac_id = models.ForeignKey(Facultad, on_delete=models.CASCADE, default=1)
18 18
     credits_taken = models.IntegerField(default=0)
19 19
     credits_taken_score = models.IntegerField(default=0)
20
+    current_year = models.IntegerField(default=1)
21
+    current_semester = models.IntegerField(default=1)
20 22
 
21 23
 class Matricula(models.Model):
22 24
     user_id = models.ForeignKey(User, on_delete=models.CASCADE, default=1)