@@ -34,16 +34,17 @@ import FoundationXML
3434#endif
3535import Logging
3636
37- // MARK: - Run Lambda
37+ // MARK: - Run SCF function
3838
39- Lambda . run { ( context: Lambda . Context , _: Request , callback: @escaping ( Result < [ Exchange ] , Error > ) -> Void ) in
39+ SCF . run { ( context: SCF . Context , _: Request , callback: @escaping ( Result < [ Exchange ] , Error > ) -> Void ) in
4040 let calculator = ExchangeRatesCalculator ( )
4141 calculator. run ( logger: context. logger, callback: callback)
4242}
4343
4444// MARK: - Business Logic
4545
46- // This is a contrived example performing currency exchange rate lookup and conversion using URLSession and XML parsing
46+ // This is a contrived example performing currency exchange rate lookup and conversion using
47+ // URLSession and XML parsing.
4748struct ExchangeRatesCalculator {
4849 static let currencies = [ " EUR " , " USD " , " JPY " ]
4950 static let currenciesEmojies = [
@@ -56,7 +57,8 @@ struct ExchangeRatesCalculator {
5657 let calendar : Calendar
5758
5859 init ( ) {
59- // This is data from HMRC, the UK tax authority. Therefore we want to use their locale when interpreting data from the server.
60+ // This is data from HMRC, the UK tax authority. Therefore we want to use their
61+ // locale when interpreting data from the server.
6062 self . locale = Locale ( identifier: " en_GB " )
6163 // Use the UK calendar, not the system one.
6264 var calendar = self . locale. calendar
0 commit comments