-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(management): add backend functions and translation (#1104)
- Loading branch information
Showing
35 changed files
with
1,651 additions
and
4,448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
apps/web/src/actions/core/AdministrationService/delete-actions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"use server"; | ||
|
||
import { | ||
getAdministrationServiceClient, | ||
structuredError, | ||
structuredResponse, | ||
} from "src/lib"; | ||
|
||
export async function deleteLanguageByIdApi(id: string) { | ||
try { | ||
const client = await getAdministrationServiceClient(); | ||
const dataResponse = | ||
await client.languages.deleteApiLanguageManagementLanguagesById({ | ||
id, | ||
}); | ||
return structuredResponse(dataResponse); | ||
} catch (error) { | ||
return structuredError(error); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
apps/web/src/actions/core/AdministrationService/post-actions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"use server"; | ||
|
||
import type { PostApiLanguageManagementLanguagesData } from "@ayasofyazilim/saas/AdministrationService"; | ||
import { | ||
getAdministrationServiceClient, | ||
structuredError, | ||
structuredResponse, | ||
} from "src/lib"; | ||
|
||
export async function postLanguageApi( | ||
data: PostApiLanguageManagementLanguagesData, | ||
) { | ||
try { | ||
const client = await getAdministrationServiceClient(); | ||
const dataResponse = | ||
await client.languages.postApiLanguageManagementLanguages(data); | ||
return structuredResponse(dataResponse); | ||
} catch (error) { | ||
return structuredError(error); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.