feat(api): fix POST /invoice

This commit is contained in:
2025-08-26 22:40:49 +02:00
parent 788571162d
commit 794558a007
12 changed files with 181 additions and 84 deletions

View File

@@ -0,0 +1,17 @@
package jtype
import (
"strings"
"time"
)
type Duration time.Duration
func (d *Duration) UnmarshalJSON(b []byte) error {
dur, err := time.ParseDuration(strings.ReplaceAll(string(b), `"`, ""))
if err != nil {
return err
}
*d = Duration(dur)
return nil
}