API : titre et logo personnalisés (/api/settings, /api/logo)
Logo PNG recadré au centre et réduit à 64x64 côté serveur, ré-encodé. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013WSSWgbf7gUzTzEqhjqtzN
This commit is contained in:
1 parent
2e44f2ac38
commit
baa412d02e
4 files changed
+356
-5
No files matched your search
@@ -145,11 +145,11 @@ func TestMoveMany(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
var png = []byte("\x89PNG\r\n\x1a\nfake")
|
||||
var fakePNG = []byte("\x89PNG\r\n\x1a\nfake")
|
||||
|
||||
func TestThumbs(t *testing.T) {
|
||||
s := newStore(t)
|
||||
if err := s.WriteThumb("d/a.excalidraw", png); !errors.Is(err, ErrNotFound) {
|
||||
if err := s.WriteThumb("d/a.excalidraw", fakePNG); !errors.Is(err, ErrNotFound) {
|
||||
t.Fatalf("miniature d'un schéma absent : %v", err)
|
||||
}
|
||||
if _, _, err := s.Write("d/a.excalidraw", []byte(doc), "", true); err != nil {
|
||||
@@ -161,10 +161,10 @@ func TestThumbs(t *testing.T) {
|
||||
if _, _, err := s.ReadThumb("d/a.excalidraw"); !errors.Is(err, ErrNotFound) {
|
||||
t.Fatalf("miniature inexistante : %v", err)
|
||||
}
|
||||
if err := s.WriteThumb("d/a.excalidraw", png); err != nil {
|
||||
if err := s.WriteThumb("d/a.excalidraw", fakePNG); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if b, _, err := s.ReadThumb("d/a.excalidraw"); err != nil || string(b) != string(png) {
|
||||
if b, _, err := s.ReadThumb("d/a.excalidraw"); err != nil || string(b) != string(fakePNG) {
|
||||
t.Fatalf("lecture : %q, %v", b, err)
|
||||
}
|
||||
// Suit le déplacement du dossier, la copie, puis la suppression.
|
||||
|
||||
Reference in new issue
Block a user