style: #6556 set default user image, set users image #2168

Merged
jon merged 11 commits from 6556-ChangeImages into dev 2024-03-26 06:35:12 +00:00
Member
No description provided.
jon added 1 commit 2024-03-14 14:05:23 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
d8a5bf8c84
style: #6556 set default user image, set users image
jon requested review from jgallego 2024-03-14 14:06:58 +00:00
jon added 1 commit 2024-03-14 14:11:09 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
82001d8352
Merge branch 'dev' into 6556-ChangeImages
jon added 1 commit 2024-03-14 14:49:44 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
c6f7a8bdb0
refactor: #6556 drop useless test
jon reviewed 2024-03-14 14:51:54 +00:00
@ -14,4 +14,2 @@
expect(contentType).toEqual('image/png');
});
it(`should return false if the user doesn't have image`, async() => {
Author
Member

He quitado este test porque con esta tarea todos los usuarios pasan a tener foto, por lo que iba a dar error siempre

He quitado este test porque con esta tarea todos los usuarios pasan a tener foto, por lo que iba a dar error siempre
jon marked this conversation as resolved
jgallego refused to review 2024-03-14 15:54:47 +00:00
jon added 1 commit 2024-03-15 09:48:34 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
67c572f187
fixed dropped test
jon requested review from jgallego 2024-03-15 09:48:51 +00:00
jgallego requested review from alexm 2024-03-20 10:47:27 +00:00
jgallego approved these changes 2024-03-21 06:44:41 +00:00
Dismissed
@ -17,3 +18,1 @@
it(`should return false if the user doesn't have image`, async() => {
const userId = 1110;
const image = await models.Image.download(ctx, collection, size, userId);
// TEST RETURNS TRUE IF USER IMAGE ID MATCHES WITH THE DOWNLOAD IMAGE NAME
Owner

estos comentarios no son necesarios porque la explicacion ya esta en el it

estos comentarios no son necesarios porque la explicacion ya esta en el it
jon marked this conversation as resolved
alexm requested changes 2024-03-22 06:47:29 +00:00
Dismissed
@ -133,0 +128,4 @@
(1108, 'CharlesXavier', 'Charles Xavier', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 1, 1, 'CharlesXavier@mydomain.com', 'en','1108'),
(1109, 'BruceBanner', 'Bruce Banner', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 1, 1, 'BruceBanner@mydomain.com', 'en','1109'),
(1110, 'JessicaJones', 'Jessica Jones', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 1, 1, 'JessicaJones@mydomain.com', 'en','1110'),
(1111, 'Missing', 'Missing', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 0, NULL, 'en','1111'),
Member

Poniendo el mismo hash que tienen los workers 1,9, etc aqui te evitarias tener que duplicar la foto generica

Poniendo el mismo hash que tienen los workers 1,9, etc aqui te evitarias tener que duplicar la foto generica
jon marked this conversation as resolved
jon added 4 commits 2024-03-22 08:35:25 +00:00
jon added 1 commit 2024-03-22 09:10:51 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
595b86b33e
refs #6556 fixed hash changes
jon requested review from jgallego 2024-03-22 09:12:22 +00:00
jon requested review from alexm 2024-03-22 09:12:24 +00:00
jgallego approved these changes 2024-03-22 12:42:05 +00:00
alexm requested changes 2024-03-25 07:01:47 +00:00
Dismissed
@ -133,0 +128,4 @@
(1108, 'CharlesXavier', 'Charles Xavier', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 1, 1, 'CharlesXavier@mydomain.com', 'en','1108'),
(1109, 'BruceBanner', 'Bruce Banner', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 1, 1, 'BruceBanner@mydomain.com', 'en','1109'),
(1110, 'JessicaJones', 'Jessica Jones', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 1, 1, 'JessicaJones@mydomain.com', 'en','1110'),
(1111, 'Missing', 'Missing', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 0, NULL, 'en','e7723f0b24ff05b32ed09d95196f2f29'),
Member

Si quieres mantener la imagen de "hacker" puedes ponerle al worker 1111 y 1112 el mismo hash
Pero luego a los archivos de la imagen quédate con uno solo.

De modo que:
Aquí en fixtures:
(1111, ..., hashQueTeInventes),
(1112, ..., hashQueTeInventes).

Y en storage:
storage/image/user/1600x1600/1111.png → storage/image/user/1600x1600/hashQueTeInventes.png
storage/image/user/1600x1600/1112.png → Eliminar
(hacer lo mismo en todas las medidas)

Si quieres mantener la imagen de "hacker" puedes ponerle al worker 1111 y 1112 el mismo hash Pero luego a los archivos de la imagen quédate con uno solo. **De modo que:** Aquí en fixtures: (1111, ..., hashQueTeInventes), (1112, ..., hashQueTeInventes). Y en storage: storage/image/user/1600x1600/1111.png → storage/image/user/1600x1600/hashQueTeInventes.png storage/image/user/1600x1600/1112.png → Eliminar (hacer lo mismo en todas las medidas)
Author
Member

@alexm he hecho un pull de origin/dev y los workers 1111 y 1112 ya no existen. Borro entonces las referencias en db/dump/fixtures.before.sql y sus fotos?

@alexm he hecho un pull de origin/dev y los workers 1111 y 1112 ya no existen. Borro entonces las referencias en db/dump/fixtures.before.sql y sus fotos?
Member

Vale ya no hacen falta. borra sus fotos

Vale ya no hacen falta. borra sus fotos
jon marked this conversation as resolved
jon added 2 commits 2024-03-25 13:33:54 +00:00
jon requested review from alexm 2024-03-25 13:36:19 +00:00
alexm approved these changes 2024-03-26 06:32:28 +00:00
jon merged commit c830c48ca9 into dev 2024-03-26 06:35:12 +00:00
jon deleted branch 6556-ChangeImages 2024-03-26 06:35:12 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#2168
No description provided.