Skip to content

Commit

Permalink
Fixed some userId issues as well as dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rhit-villencr committed Dec 16, 2024
1 parent 9bc6d7d commit 8133dfd
Show file tree
Hide file tree
Showing 11 changed files with 286 additions and 503 deletions.
3 changes: 2 additions & 1 deletion app/addCalendarEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { cLog } from './log'

export default function AddCalendarEvents() {
const initialData = {
user_id: 1,
userId: 1,
title: '',
event_date: new Date(),
event_time: new Date(),
Expand All @@ -30,6 +30,7 @@ export default function AddCalendarEvents() {
repeating: Boolean(saveData.repeating),
repeat_timeline: saveData.repeating
};
cLog(payload);
const hit = IPAddr + '/add_calendar_event';
cLog('Saving event to:' + hit);
const response = await axios.post(hit, payload);
Expand Down
1 change: 0 additions & 1 deletion app/addEventPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const GenericAddPageForm: React.FC<FormProps> = ({ title, initialData, fields, m
handleChange('ingredients', selectedItems);
};

cLog(formData)
return (
<ScrollView contentContainerStyle={styles.addContainer}>
<Text style={styles.sectionHeader}>{title}</Text>
Expand Down
3 changes: 2 additions & 1 deletion app/addFinanceEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { cLog } from './log'

export default function AddFinanceEvents() {
const initialData = {
user_id: 1,
userId: 1,
title: '',
event_date: new Date(),
event_time: new Date(),
Expand All @@ -30,6 +30,7 @@ export default function AddFinanceEvents() {
repeating: Boolean(saveData.repeating),
repeat_timeline: saveData.repeating
};
cLog(payload);
const hit = IPAddr + '/add_finance_events';
cLog('Saving event to:' + hit);
const response = await axios.post(hit, payload);
Expand Down
3 changes: 2 additions & 1 deletion app/addHealthEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { cLog } from './log'

export default function AddHealthEvents() {
const initialData = {
user_id: 1,
userId: 1,
title: '',
event_date: new Date(),
event_time: new Date(),
Expand All @@ -29,6 +29,7 @@ export default function AddHealthEvents() {
repeating: Boolean(saveData.repeating),
repeat_timeline: saveData.repeating
};
cLog(payload);
cLog('Payload:' + JSON.stringify(payload));
const hit = IPAddr + '/add_health_events';
cLog('Saving event to:' + hit);
Expand Down
3 changes: 2 additions & 1 deletion app/addMeals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { cLog } from './log'
export default function AddMeals() {
const [ingredients, setIngredients] = useState([]);
const initialData = {
user_id: 1,
userId: 1,
title: '',
event_date: new Date(),
event_time: new Date(),
Expand Down Expand Up @@ -53,6 +53,7 @@ export default function AddMeals() {
repeat_timeline: saveData.repeating,
ingredients: saveData.ingredients.join(','),
};
cLog(payload);
cLog('Payload:' + JSON.stringify(payload));
const hit = IPAddr + '/add_meal_events';
cLog('Saving event to:' + hit);
Expand Down
4 changes: 2 additions & 2 deletions app/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// export const IPAddr = "http://34.204.83.156:8080" // For AWS
export const IPAddr = "http://137.112.197.195:8080" // For local testing on laptop
export const logging = false;
export const IPAddr = "http://137.112.196.239:8080" // For local testing on laptop
export const logging = true;

export const repeatingData = [
{ label: 'Daily', value: 1 },
Expand Down
2 changes: 1 addition & 1 deletion backend/.idea/dataSources.local.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified backend/omniplanner.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public int getUserId() {
return userId;
}

public void setUserId(int user_id) {
this.userId = user_id;
public void setUserId(int userId) {
this.userId = userId;
}

public String getTitle() {
Expand Down
Loading

0 comments on commit 8133dfd

Please sign in to comment.