public ActionResult <HabitResponse> UpdateHabit(Guid userID, Guid id, [FromBody] RequestData data) { var result = Habit.UpdateHabit(id, data, userID);; if (result == null) { return(NotFound("User not found")); } return(result); }
public static Habit Update(Guid habitID, Guid userID, String habit_name, String[] days) { IGainer logGainer = new LogSuccess(); if (!checkDays(days)) { return(null); } Habit h = Habit.UpdateHabit(habitID, userID, habit_name, logGainer); h.UpdateDayOff(days); return(h); }