Revert "revert: foto de perfil e BIMI, para restaurar o servico"
Repoe as duas funcionalidades. A reversao foi uma precaucao enquanto o site estava em baixo, e acabou por ser ela a provar que a culpa nao era delas: o 502 continuou depois de reverter. A avaria era o servico web nao declarar porta nenhuma, o que levava o Coolify a gerar um servico Traefik apontado ao porto 80. Fica corrigida no commit anterior, com expose 3000. As migracoes 0012 e 0013 nunca sairam do repositorio nem da base de dados, por isso o codigo reposto encontra as tabelas que espera. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e93fa19bdd
commit
c59548e311
26 files changed
+1899
-21
No files matched your search
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"lambdamail/protocols/internal/infrastructure/postgres"
|
||||
httppresentation "lambdamail/protocols/internal/presentation/http"
|
||||
)
|
||||
|
||||
// bimiStore adapts the repository to the shape the HTTP layer asks for, so
|
||||
// that layer does not import the database package.
|
||||
type bimiStore struct {
|
||||
repo *postgres.BimiRepository
|
||||
}
|
||||
|
||||
func (s bimiStore) Save(ctx context.Context, domain string, svg []byte, vmcURL string) (string, error) {
|
||||
return s.repo.Save(ctx, domain, svg, vmcURL)
|
||||
}
|
||||
|
||||
func (s bimiStore) Load(ctx context.Context, domain string) (*httppresentation.BimiLogo, error) {
|
||||
logo, err := s.repo.Load(ctx, domain)
|
||||
if err != nil || logo == nil {
|
||||
return nil, err
|
||||
}
|
||||
return &httppresentation.BimiLogo{SVG: logo.SVG, ETag: logo.ETag, VmcURL: logo.VmcURL}, nil
|
||||
}
|
||||
|
||||
func (s bimiStore) Delete(ctx context.Context, domain string) error {
|
||||
return s.repo.Delete(ctx, domain)
|
||||
}
|
||||
Reference in new issue
Block a user