From 5c96958d1ca01b8c3d9a509398eb2591797d7b70 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Tue, 12 Sep 2023 12:58:46 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=B8=D0=B5=20-?= =?UTF-8?q?=20=D1=80=D0=B0=D0=B7=D0=BD=D1=8B=D0=B5=20=D1=81=D0=B5=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D0=B7=D0=B0=D1=82=D0=BE=D1=80=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- accounts/views.py | 1 - db.sqlite3 | Bin 225280 -> 225280 bytes feedback/serializers.py | 25 +++++++++++++++++++------ feedback/views.py | 25 +++++++++++++++++++++---- front/src/components/cardLike.vue | 26 +++++++++++++++----------- watcher/consumers.py | 1 - 6 files changed, 55 insertions(+), 23 deletions(-) diff --git a/accounts/views.py b/accounts/views.py index f93c94ef7..8d31c3467 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -41,7 +41,6 @@ class getuserAPIView(APIView): def get(self, request): userlogin = request.query_params.get('userlogin') - print('--------------------------', self.request.query_params) queryset = model_to_dict(DictEmployee.objects.using('user_directory').get(login=userlogin)) diff --git a/db.sqlite3 b/db.sqlite3 index 4564e77692b37fb05a0c4f0ab49258012b0d0de6..6496202a4ce4eb15ad422ab3a8e70006a41b0e61 100644 GIT binary patch delta 604 zcmZXRJ!lj`6vt=YpnJ z#7;S3v`|w8f+&iZX=7t22Gd167PPYn7J@+wXHFrY@4^2K^M3DxnboYgnicOJ2lK(b z@_D5%y9=CF22c30JRX^1^@2#R(uu(b{*=bI`qkV0DwX{zT&|u8J-?pR{UnHZRErx? zBlN@CoZp-a{>#W;OHfFeV{Hgy4NifzA^93yx5VM+aF)iSAmJH+!yFt4V+%ZEfM0Nk z?ckp0|bMvA*1P4e_i?3c=>=CXILawArE@`=tI`p8s z=QopjkVFv=>$PA$==FL?$SmeaI{7aaCVqp*QKK0*t|`N!>c(&fa0mDBGrrL-yb|+- zUt*SQm)H$lRLmk((lRJ*W$K`e*~E5p#2BZoAAfGJP{|QWDKIr1J(W}R-yGnk$M)S5 z_UQ5OkZyo`1b^apHFv08cx^qkt*5rxW1LaU44YP3hLcLC%DR?Sw1PLr#;Ln`k!9%F XnwhpWbJQL|ID*s)`lsCWE-U>87tn;$ delta 602 zcmZWlOK1~O6n*dBOeV=pa>w+eHfb{B2W+*I$*+lnlo@g9LU3Q&g-xMu1QA3D1sBqt z63V0CC#!BGqM)5^S8hbDmWrU2S-21^)`AK}7tV~Jg7?DVynD{&aNoS2p7+x?h9Gt8 zX8vS=52q$fUg+F4_s5OBgIG@p_dM_KyfW|c#-bptKgIhw2?-ao>T4l);V>vWp4o*fs+jJ<5viXs92I-+!!Zwf0DYLH zB_XeZE`Ol+^ep9h<|>>c(d|K8EWLm^%qojQUV}rpn0o1%YcQ&aFHhm1G{{)&qPXxG z2EcBJ2b*B>N$<&9n1}@{J3{uMn8^5<<@7Esc%}~vO2^S{;eCRpH?jqreen%O8}#V0 zinnQQ{Bl?oVo{xTr}>`?gUJck{rfJD7!q@f{|t1iX + Вы оценили сайт на {{average}} {{myLabel()}} @@ -112,7 +113,7 @@ export default { .then(data => { t_userComment.value = data.data.results }) - + } onMounted(() => { @@ -173,18 +174,21 @@ export default { } function proba() { - console.log(t_userComment.value, 't_userComment.value'); + f_userComment() + // console.log(t_userComment.value, 't_userComment.value'); // console.log(ratingStatus.value.decFeed, 'ratingStatus.value.decFeed'); - // const feedObj = {} + const feedObj = {} - // feedObj.comment = comment.value - // feedObj.ratingstatus = ratingStatus.value.decFeed - // if (t_userComment.value.length==0) { - // axiosApiInstance.post(`api/feedback/userComment/`, feedObj) - // } - // else { - // axiosApiInstance.put(`api/feedback/userCommentUp/${t_userComment.value[0].id}/`, feedObj) - // } + feedObj.comment = comment.value + feedObj.ratingstatus = ratingStatus.value.decFeed + if (t_userComment.value.length==0) { + console.log('111111111111111111'); + axiosApiInstance.post(`api/feedback/userComment/`, feedObj) + } + else { + axiosApiInstance.put(`api/feedback/userCommentUp/${t_userComment.value[0].id}/`, feedObj) + } + console.log(t_userComment.value); } return {t_baseCriteria, tab_userComment, comment, average, feedAll, feedUp, menusCloses, myLabel, proba} diff --git a/watcher/consumers.py b/watcher/consumers.py index 04e355318..2933a885d 100644 --- a/watcher/consumers.py +++ b/watcher/consumers.py @@ -20,7 +20,6 @@ class WatcherConsumer(AsyncWebsocketConsumer): self.room_group_name, self.channel_name ) online = [x.decode('utf-8') for x in self.client.hvals("online")] - print(online) await self.channel_layer.group_send( self.room_group_name, {