-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(passkit_server): Passkit Backend #76
Conversation
extension PasskitServerExtension on Router { | ||
void addPassKitServer(PassKitBackend backend) { | ||
post( | ||
'/v1/devices/<deviceID>/registrations/<passTypeID>/<serial>', | ||
setupNotifications(backend), | ||
); | ||
get( | ||
'/v1/devices/<deviceID>/registrations/<typeID>', | ||
getListOfUpdatablePasses(backend), | ||
); | ||
delete( | ||
'/v1/devices/<deviceID>/registrations/<passTypeID>/<serial>', | ||
stopNotifications(backend), | ||
); | ||
get('/v1/passes/<identifier>/<serial>', getLatestVersion(backend)); | ||
post('/v1/log', logMessages(backend)); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a shelf routing middleware. That ensures better compatibility with dart_frog. For shelf_router compatibility should still be maintained though, but I guess that's easy enough to do and requires just some documentation or example code. That way, this package also doesn't depend on the shelf_router package itself.
References:
Resolves #12