@hed-hog/contact 0.0.24 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hedhog/data/route.yaml
CHANGED
|
@@ -16,27 +16,15 @@
|
|
|
16
16
|
- url: /person/:personId/person-metadata/:id
|
|
17
17
|
method: GET
|
|
18
18
|
relations: *a1
|
|
19
|
-
- url: /person
|
|
19
|
+
- url: /person
|
|
20
20
|
method: GET
|
|
21
|
-
relations: &
|
|
21
|
+
relations: &a3
|
|
22
22
|
role:
|
|
23
23
|
- where:
|
|
24
24
|
slug: admin
|
|
25
|
-
- url: /person
|
|
26
|
-
method: POST
|
|
27
|
-
relations: *a2
|
|
28
|
-
- url: /person-type/:id
|
|
29
|
-
method: GET
|
|
30
|
-
relations: *a2
|
|
31
|
-
- url: /person-type/:id
|
|
32
|
-
method: PATCH
|
|
33
|
-
relations: *a2
|
|
34
|
-
- url: /person-type
|
|
35
|
-
method: DELETE
|
|
36
|
-
relations: *a2
|
|
37
|
-
- url: /person
|
|
25
|
+
- url: /person/stats
|
|
38
26
|
method: GET
|
|
39
|
-
relations:
|
|
27
|
+
relations:
|
|
40
28
|
role:
|
|
41
29
|
- where:
|
|
42
30
|
slug: admin
|
|
@@ -160,24 +148,6 @@
|
|
|
160
148
|
- url: /person-address-type
|
|
161
149
|
method: DELETE
|
|
162
150
|
relations: *a9
|
|
163
|
-
- url: /person-custom-type
|
|
164
|
-
method: GET
|
|
165
|
-
relations: &a10
|
|
166
|
-
role:
|
|
167
|
-
- where:
|
|
168
|
-
slug: admin
|
|
169
|
-
- url: /person-custom-type
|
|
170
|
-
method: POST
|
|
171
|
-
relations: *a10
|
|
172
|
-
- url: /person-custom-type/:id
|
|
173
|
-
method: GET
|
|
174
|
-
relations: *a10
|
|
175
|
-
- url: /person-custom-type/:id
|
|
176
|
-
method: PATCH
|
|
177
|
-
relations: *a10
|
|
178
|
-
- url: /person-custom-type
|
|
179
|
-
method: DELETE
|
|
180
|
-
relations: *a10
|
|
181
151
|
- url: /person-relation-type
|
|
182
152
|
method: GET
|
|
183
153
|
relations: &a11
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hed-hog/contact",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"@nestjs/jwt": "^11",
|
|
11
11
|
"@nestjs/mapped-types": "*",
|
|
12
12
|
"@hed-hog/api": "0.0.3",
|
|
13
|
-
"@hed-hog/country": "0.0.9",
|
|
14
13
|
"@hed-hog/api-locale": "0.0.10",
|
|
14
|
+
"@hed-hog/country": "0.0.9",
|
|
15
15
|
"@hed-hog/api-pagination": "0.0.3",
|
|
16
|
-
"@hed-hog/admin": "0.0.129",
|
|
17
16
|
"@hed-hog/api-prisma": "0.0.4",
|
|
17
|
+
"@hed-hog/admin": "0.0.129",
|
|
18
18
|
"@hed-hog/api-mail": "0.0.7"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
-- Criação da função trigger
|
|
2
|
-
CREATE OR REPLACE FUNCTION sync_person_to_user()
|
|
3
|
-
RETURNS TRIGGER AS $$
|
|
4
|
-
BEGIN
|
|
5
|
-
-- Executa apenas se for INSERT ou se name/photo_id mudaram
|
|
6
|
-
IF (TG_OP = 'INSERT') OR
|
|
7
|
-
(OLD.name IS DISTINCT FROM NEW.name) OR
|
|
8
|
-
(OLD.photo_id IS DISTINCT FROM NEW.photo_id) THEN
|
|
9
|
-
UPDATE "user"
|
|
10
|
-
SET name = NEW.name,
|
|
11
|
-
photo_id = NEW.photo_id
|
|
12
|
-
WHERE id = NEW.id;
|
|
13
|
-
END IF;
|
|
14
|
-
|
|
15
|
-
RETURN NEW;
|
|
16
|
-
END;
|
|
17
|
-
$$ LANGUAGE plpgsql;
|
|
18
|
-
|
|
19
|
-
-- Criação da trigger na tabela person
|
|
20
|
-
DROP TRIGGER IF EXISTS person_sync_user_trigger ON person;
|
|
21
|
-
|
|
22
|
-
CREATE TRIGGER person_sync_user_trigger
|
|
23
|
-
AFTER INSERT OR UPDATE OF name, photo_id ON person
|
|
24
|
-
FOR EACH ROW
|
|
25
|
-
EXECUTE FUNCTION sync_person_to_user();
|