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