Skip to content
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

Merged
merged 14 commits into from
Sep 25, 2024
Merged

feat(passkit_server): Passkit Backend #76

merged 14 commits into from
Sep 25, 2024

Conversation

ueman
Copy link
Owner

@ueman ueman commented Aug 27, 2024

Resolves #12

@ueman ueman changed the title Passkit Backend feature(passkit_server): Passkit Backend Aug 31, 2024
@ueman ueman changed the title feature(passkit_server): Passkit Backend feat(passkit_server): Passkit Backend Aug 31, 2024
Comment on lines +8 to +25
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));
}
}
Copy link
Owner Author

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:

@ueman ueman marked this pull request as ready for review September 25, 2024 18:41
@ueman ueman merged commit bd8e649 into master Sep 25, 2024
1 of 2 checks passed
@ueman ueman deleted the backend branch September 25, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create PkPass server package
1 participant