11 lines
326 B
Gleam
11 lines
326 B
Gleam
import gleam/dynamic/decode.{type Decoder}
|
|
import models/waypoint_symbol.{type WaypointSymbol}
|
|
|
|
pub type WaypointOrbital {
|
|
WaypointOrbital(symbol: WaypointSymbol)
|
|
}
|
|
|
|
pub fn decoder() -> Decoder(WaypointOrbital) {
|
|
use symbol <- decode.field("symbol", waypoint_symbol.decoder())
|
|
decode.success(WaypointOrbital(symbol:))
|
|
}
|