Skip to content
Permalink
Browse files

Bug: Setting time on a task deleted comment 😮

  • Loading branch information...
upvalue committed Feb 15, 2019
1 parent fabbf2d commit 93783dfe65d6405b85d70208a42761f74bb635d8
Showing with 4 additions and 9 deletions.
  1. +2 −4 backend/app.go
  2. +1 −0 backend/habitsweb.go
  3. +1 −4 frontend-ng/src/index.tsx
  4. +0 −1 frontend/habits/components/Task.tsx
@@ -185,8 +185,6 @@ func App() *macaron.Macaron {
return m
}

var app = App()

// Main is the entry point for meditations; it handles CLI options and starts
func Main() {
app := cli.NewApp()
@@ -331,8 +329,8 @@ func Main() {
log.Printf("starting server")

server := &http.Server{
Addr: fmt.Sprintf("%s:%v", Config.Host, Config.Port),
// Handler: app,
Addr: fmt.Sprintf("%s:%v", Config.Host, Config.Port),
Handler: App(),
}

err := server.ListenAndServe()
@@ -545,6 +545,7 @@ func habitsIndex(c *macaron.Context) {
}

func habitsInit(m *macaron.Macaron) {
fmt.Printf("HELLO WORLD\n")
m.Get("/", habitsIndex)

m.Get("/in-year", tasksInYear)
@@ -11,7 +11,4 @@ if (loader) loader.remove();

ReactDOM.render(<App />, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();
serviceWorker.unregister();
@@ -200,7 +200,6 @@ export class CTaskImpl extends Editable<TaskProps, TaskState> {

// Do not update comment
const task = { ...this.props.task, Minutes: minutes + (hours * 60) };
delete task.Comment;

api.TaskUpdate(task);
});

0 comments on commit 93783df

Please sign in to comment.
You can’t perform that action at this time.