Mercurial > libervia-web
diff libervia/pages/photos/new/page_meta.py @ 1509:106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 08 Apr 2023 13:44:11 +0200 |
parents | 39719ff4fcad |
children |
line wrap: on
line diff
--- a/libervia/pages/photos/new/page_meta.py Fri Apr 07 15:20:40 2023 +0200 +++ b/libervia/pages/photos/new/page_meta.py Sat Apr 08 13:44:11 2023 +0200 @@ -16,17 +16,17 @@ async def on_data_post(self, request): - request_data = self.getRData(request) - profile = self.getProfile(request) - name = self.getPostedData(request, "name").replace('/', '_') + request_data = self.get_r_data(request) + profile = self.get_profile(request) + name = self.get_posted_data(request, "name").replace('/', '_') albums_path = "/albums" album_path = f"{albums_path}/{name}" if profile is None: - self.pageError(request, C.HTTP_BAD_REQUEST) + self.page_error(request, C.HTTP_BAD_REQUEST) fis_ns = self.host.ns_map["fis"] http_upload_ns = self.host.ns_map["http_upload"] - entities_services, __, __ = await self.host.bridgeCall( - "discoFindByFeatures", + entities_services, __, __ = await self.host.bridge_call( + "disco_find_by_features", [fis_ns, http_upload_ns], [], False, @@ -44,8 +44,8 @@ "administrator to add one")) try: - await self.host.bridgeCall( - "FISCreateDir", + await self.host.bridge_call( + "fis_create_dir", fis_service, "", albums_path, @@ -60,8 +60,8 @@ raise e try: - await self.host.bridgeCall( - "FISCreateDir", + await self.host.bridge_call( + "fis_create_dir", fis_service, "", album_path, @@ -75,8 +75,8 @@ log.error(f"Can't create {album_path} path: {e}") raise e - await self.host.bridgeCall( - "interestsRegisterFileSharing", + await self.host.bridge_call( + "interests_file_sharing_register", fis_service, "photos", "", @@ -86,5 +86,5 @@ profile ) log.info(f"album {name} created") - request_data["post_redirect_page"] = self.getPageByName("photos") + request_data["post_redirect_page"] = self.get_page_by_name("photos") defer.returnValue(C.POST_NO_CONFIRM)