This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defresource put-delete-get [system path id json-body {:keys [find-by-id find-versions | |
create update delete-by-id validation-fn | |
has-permission] :or {has-permission (constantly true)}}] | |
:allowed-methods [:put :delete :get] | |
:available-media-types ["application/json"] | |
:allowed? (fn [{{method :request-method} :request}] | |
{::instance (find-by-id system id)}) | |
:exists? ::instance | |
:can-put-to-missing? false | |
:new? false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn path-info | |
"Returns the relative path of the request." | |
[request] | |
(or (:path-info request) | |
(:uri request))) | |
(defn authentication-failed [] | |
{:status 401 | |
:headers {"Content-Type" "application/json;charset=UTF-8"} | |
:body (json/write-str {:error "Unknown username or password."})}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoggingHandler : DelegatingHandler | |
{ | |
public LoggingHandler(HttpMessageHandler innerHandler) | |
: base(innerHandler) | |
{ | |
} | |
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
{ | |
Debug.WriteLine("Request:"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ui.core | |
(:require [seesaw.core :as c] | |
[seesaw.border :as b]) | |
(:gen-class :main true)) | |
(defn send-msg [event] | |
(let [val (-> event | |
(c/to-frame) | |
(c/select [:#msg-txt]) |
OlderNewer