Skip to content

Commit

Permalink
Update Response types
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 5, 2024
1 parent 4cc9879 commit 26b9e05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const ProfileResponse = Type.Object({
tak_role: Type.Enum(TAKRole),
tak_loc: Type.Any(),
display_stale: Type.String(),
display_text: Type.String(),
display_distance: Type.String(),
display_elevation: Type.String(),
display_speed: Type.String()
Expand Down
3 changes: 2 additions & 1 deletion api/routes/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Auth from '../lib/auth.js';
import { ProfileResponse } from '../lib/types.js'
import Config from '../lib/config.js';
import { TAKRole, TAKGroup } from '../lib/api/types.js'
import { Profile_Stale, Profile_Speed, Profile_Elevation, Profile_Distance } from '../lib/enums.js';
import { Profile_Text, Profile_Stale, Profile_Speed, Profile_Elevation, Profile_Distance } from '../lib/enums.js';

export default async function router(schema: Schema, config: Config) {
await schema.get('/profile', {
Expand Down Expand Up @@ -33,6 +33,7 @@ export default async function router(schema: Schema, config: Config) {
display_distance: Type.Optional(Type.Enum(Profile_Distance)),
display_elevation: Type.Optional(Type.Enum(Profile_Elevation)),
display_speed: Type.Optional(Type.Enum(Profile_Speed)),
display_text: Type.Optional(Type.Enum(Profile_Text)),
tak_callsign: Type.Optional(Type.String()),
tak_group: Type.Optional(Type.Enum(TAKGroup)),
tak_role: Type.Optional(Type.Enum(TAKRole)),
Expand Down

0 comments on commit 26b9e05

Please sign in to comment.