refactor: extract path logic to path.go and run go fmt on codebase
This commit is contained in:
@@ -96,17 +96,17 @@ func (b *Bark) Request(title, content string) ([]byte, error) {
|
||||
encryptData[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
jsonData, err := json.Marshal(encryptData)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
ciphertext, err := b.encryptPayload(string(jsonData))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("encryption failed: %v", err)
|
||||
}
|
||||
|
||||
|
||||
postData = map[string]interface{}{
|
||||
"ciphertext": ciphertext,
|
||||
"iv": b.IV,
|
||||
|
||||
@@ -27,7 +27,7 @@ func (v *VoceChat) Request(title, content string) ([]byte, error) {
|
||||
}
|
||||
|
||||
url := fmt.Sprintf("%s/api/bot/%s/%s", server, endpoint, v.TargetID)
|
||||
|
||||
|
||||
// Use text/plain for now as requested
|
||||
body := content
|
||||
if title != "" {
|
||||
|
||||
Reference in New Issue
Block a user