change-string-case/node_modules/@octokit/auth-token/dist-src/hook.js

13 lines
318 B
JavaScript
Raw Normal View History

2022-11-04 00:55:07 +08:00
import { withAuthorizationPrefix } from "./with-authorization-prefix";
2023-10-26 04:27:07 +08:00
async function hook(token, request, route, parameters) {
const endpoint = request.endpoint.merge(
route,
parameters
);
endpoint.headers.authorization = withAuthorizationPrefix(token);
return request(endpoint);
2022-11-04 00:55:07 +08:00
}
2023-10-26 04:27:07 +08:00
export {
hook
};