Mm 49495 Show past invoices for prior self-hosted purchases (#22397)

* future proof license queries
* add client method for fetching self-hosted invoices
Этот коммит содержится в:
Nathaniel Allred
2023-02-28 15:39:23 -06:00
коммит произвёл GitHub
родитель 552ca6fb0b
Коммит 7a8c1f587b
2 изменённых файлов: 27 добавлений и 3 удалений

Просмотреть файл

@@ -33,7 +33,7 @@ func (ls SqlLicenseStore) Save(license *model.LicenseRecord) (*model.LicenseReco
return nil, err
}
query := ls.getQueryBuilder().
Select("*").
Select("Id, CreateAt, Bytes").
From("Licenses").
Where(sq.Eq{"Id": license.Id})
queryString, args, err := query.ToSql()
@@ -64,7 +64,7 @@ func (ls SqlLicenseStore) Save(license *model.LicenseRecord) (*model.LicenseReco
// http.StatusNotFound in the StatusCode field.
func (ls SqlLicenseStore) Get(id string) (*model.LicenseRecord, error) {
query := ls.getQueryBuilder().
Select("*").
Select("Id, CreateAt, Bytes").
From("Licenses").
Where(sq.Eq{"Id": id})
@@ -82,7 +82,7 @@ func (ls SqlLicenseStore) Get(id string) (*model.LicenseRecord, error) {
func (ls SqlLicenseStore) GetAll() ([]*model.LicenseRecord, error) {
query := ls.getQueryBuilder().
Select("*").
Select("Id, CreateAt, Bytes").
From("Licenses")
queryString, _, err := query.ToSql()