File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ function normalizeMatch(match) {
42
42
delete newMatch . user_id ;
43
43
}
44
44
45
+ if ( newMatch . id ) {
46
+ newMatch [ "links.id" ] = newMatch . id ;
47
+ delete newMatch . id ;
48
+ }
49
+
45
50
if ( newMatch . uuid ) {
46
51
newMatch [ "links.uuid" ] = newMatch . uuid ;
47
52
delete newMatch . uuid ;
@@ -273,8 +278,11 @@ async function update(match, update) {
273
278
. where ( match )
274
279
. update ( { ...update , updated_at : utils . dateToUTC ( new Date ( ) ) } ) ;
275
280
276
- const updated_links = await knex ( "links" ) . select ( '*' ) . where ( match ) ;
277
-
281
+ const updated_links = await knex ( "links" )
282
+ . select ( selectable )
283
+ . where ( normalizeMatch ( match ) )
284
+ . leftJoin ( "domains" , "links.domain_id" , "domains.id" ) ;
285
+
278
286
if ( env . REDIS_ENABLED ) {
279
287
links . forEach ( redis . remove . link ) ;
280
288
updated_links . forEach ( redis . remove . link ) ;
You can’t perform that action at this time.
0 commit comments