Skip to content

Commit

Permalink
fix: update how feedback messages are sent
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Feb 22, 2025
1 parent 6c0f97f commit 647f900
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ui/FeedbackWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ class FeedbackWindow: NSWindow {
private func prepareRequest() -> URLRequest {
var request = URLRequest(url: URL(string: "https://api.github.com/repos/lwouis/alt-tab-macos/issues")!)
request.httpMethod = "POST"
request.addValue("application/vnd.github+json", forHTTPHeaderField: "Accept")
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("application/json", forHTTPHeaderField: "Accept")
// access token of the alt-tab-macos-bot github account, with scope repo > public_repo
request.addValue("Bearer " + FeedbackWindow.token, forHTTPHeaderField: "Authorization")
request.addValue("token " + FeedbackWindow.token, forHTTPHeaderField: "Authorization")
request.httpBody = try! JSONSerialization.data(withJSONObject: [
"title": issueTitle.stringValue,
"body": assembleBody(),
Expand Down

0 comments on commit 647f900

Please sign in to comment.