all repos

onasty @ 9de58ad

a one-time notes service

onasty/web/src/Api/Me.elm(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Api.Me exposing (get)

import Data.Me as Me exposing (Me)
import Effect exposing (Effect)
import Http


get : { onResponse : Result Http.Error Me -> msg } -> Effect msg
get options =
    Effect.sendApiRequest
        { endpoint = "/api/v1/me"
        , method = "GET"
        , body = Http.emptyBody
        , onResponse = options.onResponse
        , decoder = Me.decode
        }