Default work logging credit to logged-in user.
[?]
Jun 15, 2017, 1:34 PM
UOG5H2TW5R3FSHQPJCEMNFDQZS5APZUP7OM54FIBQG7ZP4HASQ7QCDependencies
- [2]
G4BS4NNDAdd simple shell script demonstrating how to invite a companion. - [3]
NAS4BFL4Trivial stylish-haskell reformat. - [4]
RN7EI6INUpdate database layer to use CreditTo - [5]
HMDM3B55Implement core of payments/billing infrastructure. - [6]
XZLSHL4DThe server is now (tenuously) running, and serving pages via SSL! - [7]
POX3UAMTEnabling logging of time to contributor/project accounts - [8]
PBD7LZYQPostgres & auth are beginning to function. - [9]
XJ4EYMIHLet curl prompt for http password, rather than bash. - [10]
UILI6PILThe route-based logStart/logStop is nicer. - [11]
HYV3VQADFix a couple of stupid typos. - [12]
7VGYLTMUClean up schema version handling. - [13]
CDHZL3RPAdd a couple of other CLI utilities for interacing with the service. - [14]
NEDDHXUKReformat via stylish-haskell - [15]
O722AOKEAdd route to allow crediting of events to users/projects. - [16]
GKLIPHR5Fix error in parsing of event metadata - [17]
SPJCFHXWUpdate shell scripts to point to https://aftok.com and prompt for input. - [18]
BWN72T44Don't accept work timestamp from an external source. - [*]
W35DDBFYFactor common JSON conversions up into client lib module. - [*]
2G3GNDDUEvent logging is now functioning in postgres. - [*]
BROSTG5KBeginning of modularization of server.
Change contents
- replacement in lib/Aftok/Json.hs at line 329
parseLogEntry :: (C.UTCTime -> LogEvent) -> Value -> Parser (C.UTCTime -> LogEntry)parseLogEntry f = unversion "LogEntry" p whereparseLogEntry :: UserId -> (C.UTCTime -> LogEvent) -> Value -> Parser (C.UTCTime -> LogEntry)parseLogEntry uid f = unversion "LogEntry" p where - replacement in lib/Aftok/Json.hs at line 332
creditTo' <- o .: "creditTo" >>= parseCreditToV2creditTo' <- o .:? "creditTo" >>= maybe (pure $ CreditToUser uid) parseCreditToV2 - replacement in scripts/create_project.sh at line 7
curl -v -k -u $USER -X POST -H "Content-Type: application/json" -d "{\"projectName\":\"$PROJECT\"}" 'https://aftok.com/projects'curl --verbose --insecure --user $USER \--request POST --header "Content-Type: application/json" \--data "{\"projectName\":\"$PROJECT\"}" \'https://aftok.com/projects' - replacement in scripts/create_user.sh at line 9
curl -k -v -H 'Content-Type: application/json' -d "{\"username\":\"$USER\", \"password\":\"$PASS\", \"email\":\"$EMAIL\", \"btcAddr\":\"$BTC_ADDR\"}" 'https://aftok.com/register'curl --verbose --insecure \--request POST --header 'Content-Type: application/json' \--data "{\"username\":\"$USER\", \"password\":\"$PASS\", \"email\":\"$EMAIL\", \"btcAddr\":\"$BTC_ADDR\"}" \'https://aftok.com/register' - replacement in scripts/invite.sh at line 5
read -p "Project ID: " PROJECTread -p "Project UUID: " PROJECT - replacement in scripts/invite.sh at line 9
curl -v -k -u $USER -X POST -d '' "https://aftok.com/projects/$PROJECT/invite?email=$EMAIL"[2.108]curl --verbose --insecure --user $USER \--request POST \--data '' \"https://aftok.com/projects/$PROJECT/invite?email=$EMAIL" - replacement in scripts/list_projects.sh at line 5
curl -k -u $USER -X GET "https://aftok.com/projects"[4.71]curl --verbose --insecure --user $USER \--request GET \"https://aftok.com/projects" - replacement in scripts/log.sh at line 7
curl -v -k -u $USER -X GET "https://aftok.com/projects/$PROJECT/logEntries?after=$(date -Iseconds --date='1 month ago')"[4.284]curl --verbose --insecure --user $USER \--request GET \"https://aftok.com/projects/$PROJECT/logEntries?after=$(date -Iseconds --date='1 month ago')" - replacement in scripts/log_end.sh at line 5
read -p "Project ID: " PROJECTread -p "User ID: " UIDread -p "Project UUID: " PROJECT - replacement in scripts/log_end.sh at line 7
curl -v -k -u $USER -X POST -d "{\"schemaVersion\": \"2.0\", \"creditTo\": {\"creditToUser\": \"$UID\"}}" "https://aftok.com/projects/$PID/logEnd"[4.562]curl --verbose --insecure --user $USER \--request POST \--data '{"schemaVersion": "2.0"}' \"https://aftok.com/projects/$PID/logEnd" - replacement in scripts/log_start.sh at line 5
read -p "Project ID: " PIDread -p "User ID: " UIDread -p "Project UUID: " PID - replacement in scripts/log_start.sh at line 7
curl -v -k -u $USER -X POST -d "{\"schemaVersion\": \"2.0\", \"creditTo\": {\"creditToUser\": \"$UID\"}}" "https://aftok.com/projects/$PID/logStart"[4.803]curl --verbose --insecure --user $USER \--request POST \--data '{"schemaVersion": "2.0"}' \"https://aftok.com/projects/$PID/logStart" - replacement in server/Aftok/Snaplet/WorkLog.hs at line 31
case A.eitherDecode requestBody >>= parseEither (parseLogEntry evCtr) ofcase A.eitherDecode requestBody >>= parseEither (parseLogEntry uid evCtr) of