refactor(apirequest): deprecate V1DocumentPOST et son constructeur

This commit is contained in:
Victor Lacasse-Beaudoin 2023-12-19 19:32:03 -05:00
parent ff3e811457
commit 3d911f3a37

View file

@ -77,6 +77,7 @@ func (request V1DocumentsPOST) Request(v *voki.Voki) (response apiresponse.V1Doc
var _ request.Requester[apiresponse.V1DocumentPOST] = V1DocumentPOST{}
// Deprecated: Use V1DocumentsPOST instead
type V1DocumentPOST struct {
Data struct {
Document *multipart.FileHeader `document`
@ -86,6 +87,7 @@ type V1DocumentPOST struct {
}
}
// Deprecated: Use NewV1DocumentsPOST instead
func NewV1DocumentPOST(bucket string, document *multipart.FileHeader) (request V1DocumentPOST, err error) {
if bucket == "" {
err = fmt.Errorf("NewV1DocumentPOST requires non-nil bucket name")