Skip to content

Commit d81b25d

Browse files
théo dubthéo dub
théo dub
authored and
théo dub
committed
filter like avancement
1 parent 682721e commit d81b25d

File tree

6 files changed

+9
-79
lines changed

6 files changed

+9
-79
lines changed

assets/Moderateur/moderateur.html

-48
Original file line numberDiff line numberDiff line change
@@ -72,54 +72,6 @@
7272
<div class="main-container">
7373
<div class="timeline">
7474
<div class="timeline-right">
75-
<!--------------.Écriture Post.----------->
76-
{{if .User.Connected}}
77-
<form method="POST" enctype="multipart/form-data">
78-
<div class="status box">
79-
<div class="status-menu"></div>
80-
<div class="status-main">
81-
<img src="{{.User.Image}}" class="status-img">
82-
<textarea class="status-textarea" name="message" placeholder="Write something ..."></textarea>
83-
</div>
84-
<div class="status-actions">
85-
<a href="/" class="status-action">
86-
<svg viewBox="-42 0 512 512" xmlns="http://www.w3.org/2000/svg">
87-
<path
88-
d="M427.2 424c0 26.7-8.5 48.3-25.3 64.3-16.5 15.7-38.4 23.7-65 23.7H90.2c-26.6 0-48.5-8-65-23.7C8.5 472.3 0 450.7 0 423.9c0-10.2.3-20.4 1-30.2a302.7 302.7 0 0112.1-64.9c3.3-10.3 7.8-20.5 13.4-30.3 5.8-10.2 12.5-19 20.1-26.3a89 89 0 0129-18.2c11.2-4.4 23.7-6.7 37-6.7 5.2 0 10.3 2.2 20 8.5l21 13.5c6.6 4.3 15.7 8.3 27 11.9a107.7 107.7 0 0033 5.3c11 0 22-1.8 33-5.3 11.2-3.6 20.3-7.6 27-12l21-13.4c9.7-6.3 14.7-8.5 20-8.5 13.3 0 25.7 2.3 37 6.7a89 89 0 0128.9 18.2c7.6 7.3 14.4 16.1 20.2 26.3 5.5 9.8 10 20 13.3 30.3a305.5 305.5 0 0112.1 64.9c.7 9.8 1 20 1 30.2zm0 0"
89-
fill="#6aa9ff" />
90-
<path
91-
d="M427.2 424c0 26.7-8.5 48.3-25.3 64.3-16.5 15.7-38.4 23.7-65 23.7H210.2V286.5h3.3c11 0 22-1.8 33-5.3 11.2-3.6 20.3-7.6 27-12l21-13.4c9.7-6.3 14.7-8.5 20-8.5 13.3 0 25.7 2.3 37 6.7a89 89 0 0128.9 18.2c7.6 7.3 14.4 16.1 20.2 26.3 5.5 9.8 10 20 13.3 30.3a305.5 305.5 0 0112.1 64.9c.7 9.8 1 20 1 30.2zm0 0"
92-
fill="#2682ff" />
93-
</svg>
94-
</a>
95-
<input type="file" name="myFile">
96-
<p class="descript_img">max size 20Mo</p>
97-
<button type="submit" class="status-share">Send</button>
98-
</div>
99-
</div>
100-
101-
<label for="cat-select">Choose a categories:</label>
102-
103-
<select name="categories" id="cat-select">
104-
<option ></option>
105-
<option value="cat1">Cat 1</option>
106-
<option value="cat2">Cat 2</option>
107-
<option value="cat3">Cat 3</option>
108-
</select>
109-
<select name="categories2" id="cat-select">
110-
<option ></option>
111-
<option value="cat1">Cat 1</option>
112-
<option value="cat2">Cat 2</option>
113-
<option value="cat3">Cat 3</option>
114-
</select>
115-
</form>
116-
{{end}}
117-
118-
<!--------------.FIN Écriture Post.----------->
119-
120-
<hr class="hr">
121-
122-
12375
<!--------------.Armature Post.----------->
12476

12577
{{range .HomeFeed}}

assets/Profil/profil.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@
273273
</div>
274274
</div>
275275
<div class="side-wrapper contacts">
276-
<div class="side-title">ACIVITÉS</div>
277276

277+
<div class="side-title">ACIVITÉS</div>
278278
<!--------------.Like Post.----------->
279279
{{range .UserLike}}
280280
<div class="album box">
@@ -323,7 +323,6 @@
323323
</div>
324324
{{end}}
325325
<!--------------. FIN Like Post.----------->
326-
327326
</div>
328327
</div>
329328
</body>

data/dataBase.go

-10
Original file line numberDiff line numberDiff line change
@@ -441,16 +441,6 @@ func SetGitHubUUID(userName string) string {
441441

442442
}
443443

444-
// /*************************** ADD LIKES **********************************/
445-
// func AddLikes(userName string, postID string, dateTime string) {
446-
447-
// _, err := Db.Exec("INSERT INTO likes (username,datetime,post_id) VALUES (?,?,?)", userName, postID, dateTime)
448-
// if err != nil {
449-
// fmt.Println("Error function AddLikes dataBase:")
450-
// fmt.Printf("err: %v\n", err)
451-
// }
452-
// }
453-
454444
/*************************** GET USER PROFIL **********************************/
455445
func GetUserProfil() map[string]string {
456446

go.mod

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
module Forum
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/didip/tollbooth v4.0.2+incompatible
7-
github.com/gofrs/uuid v4.3.1+incompatible
7+
github.com/gofrs/uuid v4.4.0+incompatible
88
github.com/mattn/go-sqlite3 v1.14.16
9+
golang.org/x/crypto v0.7.0
910
)
1011

1112
require (
12-
github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6 // indirect
13-
github.com/Nik-U/ringsig v0.0.0-20150214231607-cc567940e6b3 // indirect
14-
github.com/nik-u/ringsig v0.0.0-20150214231607-cc567940e6b3 // indirect
1513
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
1614
golang.org/x/time v0.3.0 // indirect
17-
1815
)
19-
20-
require golang.org/x/crypto v0.5.0 // indirect

go.sum

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6 h1:GU/vL5sj0IgGYEOIIAJ1HDI9dgqT0gJXkhXINri7Otc=
2-
github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6/go.mod h1:Zt2U1SemYWNGXqS1fDiZC7u74nsJTAnWK5WVgvI8OAs=
3-
github.com/Nik-U/ringsig v0.0.0-20150214231607-cc567940e6b3 h1:d+JT6AhfFVmyVMvcaz+G9GGc1aH1hgpdFb0eKTzDfT0=
4-
github.com/Nik-U/ringsig v0.0.0-20150214231607-cc567940e6b3/go.mod h1:hP2wXy6wKwNKRPNCNOooH6nYd5040URZlGrx01T2E+M=
51
github.com/didip/tollbooth v4.0.2+incompatible h1:fVSa33JzSz0hoh2NxpwZtksAzAgd7zjmGO20HCZtF4M=
62
github.com/didip/tollbooth v4.0.2+incompatible/go.mod h1:A9b0665CE6l1KmzpDws2++elm/CsuWBMa5Jv4WY0PEY=
7-
github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI=
8-
github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
3+
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
4+
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
95
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
106
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
11-
github.com/nik-u/ringsig v0.0.0-20150214231607-cc567940e6b3 h1:ic4cdiUOqj7tyyB6IrcdKMitiE/0lVlNWtFUreh4134=
12-
github.com/nik-u/ringsig v0.0.0-20150214231607-cc567940e6b3/go.mod h1:/YnWOCnjhPjyjS2ccy8B2XsHfdUjhNwFrCwOF+e7eqc=
137
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
148
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
15-
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
16-
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
9+
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
10+
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
1711
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
1812
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ func profil(w http.ResponseWriter, r *http.Request) {
638638
userLikeFeed = data.ProfilLikeFeed(user.Name)
639639
}
640640

641-
fmt.Printf("len(userLikeFeed)20: %v\n", len(userLikeFeed))
641+
fmt.Printf("data.LenLikeUserPost(user.Name) 20: %v\n", data.LenLikeUserPost(user.Name))
642642

643643
notif := r.FormValue("notif")
644644
if notif == "notif_moderateur" {

0 commit comments

Comments
 (0)