Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify mark-completed

mark-completed is never called with the optional user variable, so I
got rid of it
  • Loading branch information...
commit e3e7c9444672302d243a6347eb900499e0308820 1 parent d5b17b5
Chris Gray authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/foreclojure/problems.clj
4 src/foreclojure/problems.clj
View
@@ -134,8 +134,8 @@
(record-golf-score! user-id problem-id (code-length code))
(save-solution user-id problem-id code)))
-(defn mark-completed [problem code & [user]]
- (let [user (or user (session/session-get :user))
+(defn mark-completed [problem code]
+ (let [user (session/session-get :user)
{:keys [_id approved]} problem
gist-link (html [:span.share
[:a.novisited {:href "/share/code"} "share"]

1 comment on commit e3e7c94

Alan Malloy

The optional user was to make it possible to experiment with mark-completed at the repl. We haven't done this for some time now that mark-completed is actually working, but it's still nice to have a more-explicit (or, less "action at a distance") version. Ideally it would always take a user and be side-effect free, but that's a pretty long-term goal.

Please sign in to comment.
Something went wrong with that request. Please try again.