Repository navigation
List only the signed-in pilot's flights, and name the cities in the SimBrief preview - #349
Merged
Merged
Conversation
OpenTofu plan for
|
…imBrief preview GET /api/v1/flight takes captain=me, so a pilot's recent flights and flight history list only the flights they captained. Without signing in it answers 401. The SimBrief preview returns MyPreflight's IATA code and city for an airport it already knows, so the import window can show FRA over Frankfurt instead of SimBrief's raw fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oskarbarcz
force-pushed
the
pilot-own-flights
branch
from
November 18, 2026 10:53
e129cfa to
b3a4dfe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small additions the pilot dashboard needs once pilots import their own plans.
What changes
GET /api/v1/flight?captain=melists only the flights the signed-in user captained, combinable withphase,sortandorder. The app uses it for a pilot's Recent flights and Flight history, which listed every pilot's flights until now. Without signing in it answers401("Sign in to list your own flights."). Any other value is a400validation error.GET /api/v1/user/simbrief/:id) now returns each airport'scity, and for an airport MyPreflight already knows, MyPreflight's IATA code. It looks the airport up throughGetAirportByIcaoCodeQuery. Unknown airports keep SimBrief's IATA code, withcity: null. The import window shows "FRA" over "Frankfurt" from this.Tests
flight.list.feature: Rick lists his 3 finished flights, newest first; Alan has none; anonymous gets 401;captain=someonegets 400.simbrief.verify.feature: carries the cities.format(whole repo; its only warning is a git-excluded local.impeccablecache CI never sees),lint,test(1449) andtest:functional(1624 scenarios) all exit 0.Version 3.90.0. Stacked on #348.
Knowledge base: mypreflight/product#78. Web app: mypreflight/app#366.
🤖 Generated with Claude Code