Commit 7d24f11f authored by Georgi Angelov's avatar Georgi Angelov
Browse files

Added solveAll endpoint to return a list of all solutions

parent 9d8bf9cf
......@@ -16,6 +16,8 @@ clue = ("Peeling paint, profit slack, upset, in a state",10)
main = simpleHTTP myConf $ msum [ dir "solve" $ path $ \clue -> path $ \wordLength
-> ok $ show (solveReturn (clue, wordLength))
, dir "solveAll" $ path $ \clue -> path $ \wordLength
-> ok $ show (solveAllReturn (clue, wordLength))
, dir "solveWithAnswer" $ path $ \clue -> path $ \wordLength -> path $ \answer
-> ok $ show (solveWithAnswerReturn (clue, wordLength) answer)
]
......@@ -72,6 +72,9 @@ solveOneWithAnswer n clue answer
solveAll clue
= showSolutions False clue "" id id False
solveAllReturn clue
= returnSolutions False clue "" id id False
solveAllWithCache clue
= showSolutions False clue "" id id True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment