small pixel drawing of a pufferfish vore

fix delete ur own feedz bug
Jes Olson j3s@c3f.net
Sun, 19 Mar 2023 06:51:44 -0700
commit

782c5b2a1b6b4ebd0824af3af0df89d8830e5f08

parent

320f419e71eda610c0ba65dd441ff608b2ef39bc

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M site.gosite.go

@@ -212,7 +212,6 @@ }

// TODO: validate user input moar feeds := strings.Split(inputData, "\r\n") - s.db.UnsubscribeAll(s.username(r)) for _, feed := range feeds { // TODO: show diff before submission (like tf plan) // TODO: check if feed exists in db already?

@@ -231,6 +230,10 @@ http.Error(w, "400 bad request: "+err.Error(), 400)

fmt.Println(err) return } + } + + s.db.UnsubscribeAll(s.username(r)) + for _, feed := range feeds { s.db.WriteFeed(feed) s.db.Subscribe(s.username(r), feed) }