11 lines
322 B
Gleam
11 lines
322 B
Gleam
import gleam/dynamic/decode.{type Decoder}
|
|
import models/faction_symbol.{type FactionSymbol}
|
|
|
|
pub type WaypointFaction {
|
|
WaypointFaction(symbol: FactionSymbol)
|
|
}
|
|
|
|
pub fn decoder() -> Decoder(WaypointFaction) {
|
|
use symbol <- decode.field("symbol", faction_symbol.decoder())
|
|
decode.success(WaypointFaction(symbol:))
|
|
}
|