Skip to content

Put urls for service calls to Mail Service into a config file #36

Description

@EGKangaroo

issue in packagecontroller.cs

...
            PackageServiceModel pkgService = await flurlPackageResponse.GetJsonAsync<PackageServiceModel>();
            PackageResponseModel pkg = ServiceToResponseModelConverter.ConvertPackage(pkgService, await GetAllPersons(), await GetAllRooms());

            Console.WriteLine("package route finished is " + pkg.RouteFinished);

            if (pkg.RouteFinished)
            {
                //send email
                await "https://mailservice20210603092014.azurewebsites.net/api/ArrivalMail?code=gYOUs9FO7WwwNXz2eSGtZM0AFxQl/RQvOJ4RF0uotwYLe7l/AIGGKg==".PostJsonAsync(pkg);
            }
...

currently the urls for the calls to the serverless function mailservice is hardcoded

good practice would be to move the urls into a config file and take the value from the config file. Figure out a way to take the url from the config file. Note: in production, the url should be taken from GitHub secrets!

tip:
look at how the packageservice url has been set up as an example of how it's done

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions